Why does the string value assigned to the RequestElementN ame in the
SoapDocumentMet hodAttribute get changed?
The value below with a colon is changed to the hex value surrounded by
underscores. this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m
[System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestElementN ame = @"ns1:submitOrd erBatch",
RequestNamespac e="urn:OrderOpe rations",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
the SOAP body then contains: <ns1_x003A_subm itOrderBatch
xmlns="urn:Orde rOperations"> 9 1807
Hi,
you don't have the control over the prefix use. With the two
attributes you're almost right. Just remove the prefix from the
values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch",
RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam>
wrote: Why does the string value assigned to the RequestElementN ame in the SoapDocumentMe thodAttribute get changed?
The value below with a colon is changed to the hex value surrounded by underscores. this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestElement Name = @"ns1:submitOrd erBatch",
RequestNamespa ce="urn:OrderOp erations", Use=System.Web .Services.Descr iption.SoapBind ingUse.Literal,
ParameterStyle = System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)] the SOAP body then contains: <ns1_x003A_subm itOrderBatch xmlns="urn:Ord erOperations">
thanks, except that the web service (apache) i am talking to requires that
prefix.
is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message
news:jn******** *************** *********@4ax.c om... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
Why does the string value assigned to the RequestElementN ame in the SoapDocumentM ethodAttribute get changed?
The value below with a colon is changed to the hex value surrounded by underscores . this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestElemen tName = @"ns1:submitOrd erBatch",
RequestNamesp ace="urn:OrderO perations", Use=System.We b.Services.Desc ription.SoapBin dingUse.Literal ,
ParameterStyl e= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)] the SOAP body then contains: <ns1_x003A_subm itOrderBatch xmlns="urn:Or derOperations">
Hi..
Ehh... AFAIK Axis works using the WSDL, SOAP, XSD, XML standards (WS
Stack). Thats essentially what being a WebService is all about. Since
this is XML based, the prefix cannot be important. The prefix is
nothing else than an 'alias' to the, usualy pretty-, large namespace
uri.
If on the other hand the implementation uses string manipulation,
regular expressions or anything else than a real XML parser.. it could
be a problem.
Hope this helps,
Marvin Smit.
On Tue, 6 Sep 2005 14:15:58 +0300, "MR" <co******@newsg roup.nospam>
wrote: thanks, except that the web service (apache) i am talking to requires that prefix. is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message news:jn******* *************** **********@4ax. com... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
Why does the string value assigned to the RequestElementN ame in the SoapDocument MethodAttribute get changed?
The value below with a colon is changed to the hex value surrounded by underscore s. this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestEleme ntName = @"ns1:submitOrd erBatch",
RequestNames pace="urn:Order Operations", Use=System.W eb.Services.Des cription.SoapBi ndingUse.Litera l,
ParameterSty le= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)] the SOAP body then contains: <ns1_x003A_subm itOrderBatch xmlns="urn:O rderOperations" >
Thanks for Marvin's input,
Hi MR,
For XML Webservice, the request/response document is a standard xml
document so all the element in it conform to the XML 1.0/namepsace
standards. The prefix you mentioned just actually called namespace prefix
which is just an alias of a certain namespace URI, for example:
<element xmlns:ns1="urn: test:method" ....>
the ns1 is just alias of "urn:test:metho d" , so the important value is the
"urn:test:metho d" rather than "ns1". We can replace the "ns1" with whatever
prefix we like, in other words, the following three ones are identical([1]
,[2] and [3]:
[1]
<element xmlns:ns1="urn: test:method">
<ns1:sub />
</element>
[2]
<element xmlns:ns3="urn: test:method">
<ns3:sub />
</element>
[3]
<element xmlns="urn:test :method">
<sub />
</element>
So for your scenario, if your concern is only the namespace prefix, I don't
think you need to worry about it. Just set the correct
"RequestElement Name" and "RequestNamespa ce" is enough. For example, the
following webmethod:
[WebMethod]
[SoapDocumentMet hod(RequestElem entName="submit OrderBatch",Req uestNamespace="
urn:OrderOperat ions",
ResponseElement Name="submitOrd erBatchResponse ",
ResponseNamespa ce="urn:OrderOp erations"
)]
public string SubmitOrderBatc h()
{
return "Hello World";
}
will generate the below output:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body>
<submitOrderBat ch xmlns="urn:Orde rOperations" />
</soap:Body>
</soap:Envelope>
it is identical to this one in XML perspective:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body>
<ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations " />
</soap:Body>
</soap:Envelope>
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: Marvin Smit <ma*********@gm ail.com>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
Subject: Re: RequestElementN ame is being changed
Date: Tue, 06 Sep 2005 17:04:39 +0200
Message-ID: <pm************ *************** *****@4ax.com>
References: <OQ************ **@TK2MSFTNGP11 .phx.gbl>
<jn************ *************** *****@4ax.com>
<e7************ **@TK2MSFTNGP14 .phx.gbl>
X-Newsreader: Forte Free Agent 3.0/32.763
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: ab***@chello.nl
Organization: chello.nl
Lines: 77
NNTP-Posting-Host: 62.194.138.116 (62.194.138.116 )
NNTP-Posting-Date: Tue, 06 Sep 2005 17:04:54 +0200
X-Trace: bd352431db0169b 672fd105055
Path:
TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli
ne.de!fr.ip.nds oftware.net!213 .239.142.2.MISM ATCH!feeder.xsn ews.nl!tudelft. n
l!txtfeed2.tude lft.nl!amsnews1 1.chello.com!am snews14.chello. com!news.chello .
nl.POSTED!not-for-mail
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.webservices :7791
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Hi..
Ehh... AFAIK Axis works using the WSDL, SOAP, XSD, XML standards (WS
Stack). Thats essentially what being a WebService is all about. Since
this is XML based, the prefix cannot be important. The prefix is
nothing else than an 'alias' to the, usualy pretty-, large namespace
uri.
If on the other hand the implementation uses string manipulation,
regular expressions or anything else than a real XML parser.. it could
be a problem.
Hope this helps,
Marvin Smit.
On Tue, 6 Sep 2005 14:15:58 +0300, "MR" <co******@newsg roup.nospam>
wrote: thanks, except that the web service (apache) i am talking to requires that prefix. is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message news:jn******* *************** **********@4ax. com... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
Why does the string value assigned to the RequestElementN ame in the SoapDocument MethodAttribute get changed?
The value below with a colon is changed to the hex value surrounded by underscore s. this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestEleme ntName = @"ns1:submitOrd erBatch",
RequestNames pace="urn:Order Operations", Use=System.W eb.Services.Des cription.SoapBi ndingUse.Litera l,
ParameterSty le=
System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
the SOAP body then contains: <ns1_x003A_subm itOrderBatch xmlns="urn:O rderOperations" >
Hi MR,
How are you doing on this issue, have you got any further ideas? If
there're anything else we can help, please feel free to post here. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
X-Tomcat-ID: 85562976
References: <OQ************ **@TK2MSFTNGP11 .phx.gbl>
<jn************ *************** *****@4ax.com>
<e7************ **@TK2MSFTNGP14 .phx.gbl>
<pm************ *************** *****@4ax.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001 _8F1872AD"
Content-Transfer-Encoding: 7bit
From: st*****@online. microsoft.com (Steven Cheng[MSFT])
Organization: Microsoft
Date: Wed, 07 Sep 2005 02:46:25 GMT
Subject: Re: RequestElementN ame is being changed
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Message-ID: <FL************ *@TK2MSFTNGXA01 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
Lines: 308
Path: TK2MSFTNGXA01.p hx.gbl
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.webservices :7802
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
Thanks for Marvin's input,
Hi MR,
For XML Webservice, the request/response document is a standard xml
document so all the element in it conform to the XML 1.0/namepsace
standards. The prefix you mentioned just actually called namespace prefix
which is just an alias of a certain namespace URI, for example:
<element xmlns:ns1="urn: test:method" ....>
the ns1 is just alias of "urn:test:metho d" , so the important value is the
"urn:test:metho d" rather than "ns1". We can replace the "ns1" with whatever
prefix we like, in other words, the following three ones are identical([1]
,[2] and [3]:
[1]
<element xmlns:ns1="urn: test:method">
<ns1:sub />
</element>
[2]
<element xmlns:ns3="urn: test:method">
<ns3:sub />
</element>
[3]
<element xmlns="urn:test :method">
<sub />
</element>
So for your scenario, if your concern is only the namespace prefix, I don't
think you need to worry about it. Just set the correct
"RequestElement Name" and "RequestNamespa ce" is enough. For example, the
following webmethod:
[WebMethod]
[SoapDocumentMet hod(RequestElem entName="submit OrderBatch",Req uestNamespace="
urn:OrderOperat ions",
ResponseElement Name="submitOrd erBatchResponse ",
ResponseNamespa ce="urn:OrderOp erations"
)]
public string SubmitOrderBatc h()
{
return "Hello World";
}
will generate the below output:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body>
<submitOrderBat ch xmlns="urn:Orde rOperations" />
</soap:Body>
</soap:Envelope>
it is identical to this one in XML perspective:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body>
<ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations " />
</soap:Body>
</soap:Envelope>
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: Marvin Smit <ma*********@gm ail.com>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
Subject: Re: RequestElementN ame is being changed
Date: Tue, 06 Sep 2005 17:04:39 +0200
Message-ID: <pm************ *************** *****@4ax.com>
References: <OQ************ **@TK2MSFTNGP11 .phx.gbl>
<jn************ *************** *****@4ax.com>
<e7************ **@TK2MSFTNGP14 .phx.gbl>
X-Newsreader: Forte Free Agent 3.0/32.763
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: ab***@chello.nl
Organization: chello.nl
Lines: 77
NNTP-Posting-Host: 62.194.138.116 (62.194.138.116 )
NNTP-Posting-Date: Tue, 06 Sep 2005 17:04:54 +0200
X-Trace: bd352431db0169b 672fd105055
Path:
TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli
ne.de!fr.ip.nds oftware.net!213 .239.142.2.MISM ATCH!feeder.xsn ews.nl!tudelft. n
l!txtfeed2.tude lft.nl!amsnews1 1.chello.com!am snews14.chello. com!news.chello .
nl.POSTED!not-for-mail
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.webservices :7791
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Hi..
Ehh... AFAIK Axis works using the WSDL, SOAP, XSD, XML standards (WS
Stack). Thats essentially what being a WebService is all about. Since
this is XML based, the prefix cannot be important. The prefix is
nothing else than an 'alias' to the, usualy pretty-, large namespace
uri.
If on the other hand the implementation uses string manipulation,
regular expressions or anything else than a real XML parser.. it could
be a problem.
Hope this helps,
Marvin Smit.
On Tue, 6 Sep 2005 14:15:58 +0300, "MR" <co******@newsg roup.nospam>
wrote: thanks, except that the web service (apache) i am talking to requires that prefix. is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message news:jn******* *************** **********@4ax. com... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
Why does the string value assigned to the RequestElementN ame in the SoapDocument MethodAttribute get changed?
The value below with a colon is changed to the hex value surrounded by underscore s. this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestEleme ntName = @"ns1:submitOrd erBatch",
RequestNames pace="urn:Order Operations", Use=System.W eb.Services.Des cription.SoapBi ndingUse.Litera l,
ParameterSty le=
System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
the SOAP body then contains: <ns1_x003A_subm itOrderBatch xmlns="urn:O rderOperations" >
i am on my way to the PDC, so i'm not sure when i will get t test this out.
i will let you know what i find
thank you very much
m
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:SX******** ******@TK2MSFTN GXA01.phx.gbl.. . Hi MR,
How are you doing on this issue, have you got any further ideas? If there're anything else we can help, please feel free to post here. Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- X-Tomcat-ID: 85562976 References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> <pm************ *************** *****@4ax.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_0001 _8F1872AD" Content-Transfer-Encoding: 7bit From: st*****@online. microsoft.com (Steven Cheng[MSFT]) Organization: Microsoft Date: Wed, 07 Sep 2005 02:46:25 GMT Subject: Re: RequestElementN ame is being changed X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices Message-ID: <FL************ *@TK2MSFTNGXA01 .phx.gbl> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Lines: 308 Path: TK2MSFTNGXA01.p hx.gbl Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7802 NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
Thanks for Marvin's input,
Hi MR,
For XML Webservice, the request/response document is a standard xml document so all the element in it conform to the XML 1.0/namepsace standards. The prefix you mentioned just actually called namespace prefix which is just an alias of a certain namespace URI, for example:
<element xmlns:ns1="urn: test:method" ....>
the ns1 is just alias of "urn:test:metho d" , so the important value is the "urn:test:metho d" rather than "ns1". We can replace the "ns1" with whatever prefix we like, in other words, the following three ones are identical([1] ,[2] and [3]: [1] <element xmlns:ns1="urn: test:method"> <ns1:sub /> </element>
[2] <element xmlns:ns3="urn: test:method"> <ns3:sub /> </element>
[3]
<element xmlns="urn:test :method"> <sub /> </element>
So for your scenario, if your concern is only the namespace prefix, I don't think you need to worry about it. Just set the correct "RequestElement Name" and "RequestNamespa ce" is enough. For example, the following webmethod:
[WebMethod]
[SoapDocumentMet hod(RequestElem entName="submit OrderBatch",Req uestNamespace=" urn:OrderOperat ions", ResponseElement Name="submitOrd erBatchResponse ", ResponseNamespa ce="urn:OrderOp erations"
)]
public string SubmitOrderBatc h() { return "Hello World"; }
will generate the below output:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <submitOrderBat ch xmlns="urn:Orde rOperations" /> </soap:Body> </soap:Envelope>
it is identical to this one in XML perspective:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations " /> </soap:Body> </soap:Envelope>
Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- From: Marvin Smit <ma*********@gm ail.com> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Subject: Re: RequestElementN ame is being changed Date: Tue, 06 Sep 2005 17:04:39 +0200 Message-ID: <pm************ *************** *****@4ax.com> References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> X-Newsreader: Forte Free Agent 3.0/32.763 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: ab***@chello.nl Organization: chello.nl Lines: 77 NNTP-Posting-Host: 62.194.138.116 (62.194.138.116 ) NNTP-Posting-Date: Tue, 06 Sep 2005 17:04:54 +0200 X-Trace: bd352431db0169b 672fd105055 Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli ne.de!fr.ip.nds oftware.net!213 .239.142.2.MISM ATCH!feeder.xsn ews.nl!tudelft. n l!txtfeed2.tude lft.nl!amsnews1 1.chello.com!am snews14.chello. com!news.chello . nl.POSTED!not-for-mail Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7791 X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Hi..
Ehh... AFAIK Axis works using the WSDL, SOAP, XSD, XML standards (WS Stack). Thats essentially what being a WebService is all about. Since this is XML based, the prefix cannot be important. The prefix is nothing else than an 'alias' to the, usualy pretty-, large namespace uri.
If on the other hand the implementation uses string manipulation, regular expressions or anything else than a real XML parser.. it could be a problem.
Hope this helps,
Marvin Smit.
On Tue, 6 Sep 2005 14:15:58 +0300, "MR" <co******@newsg roup.nospam> wrote:
thanks, except that the web service (apache) i am talking to requires that prefix. is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message news:jn****** *************** ***********@4ax .com... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
Why does the string value assigned to the RequestElementN ame in the SoapDocumen tMethodAttribut e get changed?
The value below with a colon is changed to the hex value surrounded by underscores . this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestElem entName = @"ns1:submitOrd erBatch",
RequestName space="urn:Orde rOperations", Use=System. Web.Services.De scription.SoapB indingUse.Liter al,
ParameterSt yle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
the SOAP body then contains: <ns1_x003A_subm itOrderBatch xmlns="urn: OrderOperations ">
No problem, if there're any further question, please feel free to post here.
Thanks & Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "MR" <co******@newsg roup.nospam>
References: <OQ************ **@TK2MSFTNGP11 .phx.gbl>
<jn************ *************** *****@4ax.com>
<e7************ **@TK2MSFTNGP14 .phx.gbl>
<pm************ *************** *****@4ax.com>
<FL************ *@TK2MSFTNGXA01 .phx.gbl>
<SX************ **@TK2MSFTNGXA0 1.phx.gbl>
Subject: Re: RequestElementN ame is being changed
Date: Fri, 9 Sep 2005 13:54:33 +0300
Lines: 241
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <uw************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: hevron.biconix. com 62.90.12.234
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl
Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.webservices :7847
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
i am on my way to the PDC, so i'm not sure when i will get t test this out.
i will let you know what i find
thank you very much
m
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:SX******** ******@TK2MSFTN GXA01.phx.gbl.. . Hi MR,
How are you doing on this issue, have you got any further ideas? If there're anything else we can help, please feel free to post here. Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- X-Tomcat-ID: 85562976 References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> <pm************ *************** *****@4ax.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_0001 _8F1872AD" Content-Transfer-Encoding: 7bit From: st*****@online. microsoft.com (Steven Cheng[MSFT]) Organization: Microsoft Date: Wed, 07 Sep 2005 02:46:25 GMT Subject: Re: RequestElementN ame is being changed X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices Message-ID: <FL************ *@TK2MSFTNGXA01 .phx.gbl> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Lines: 308 Path: TK2MSFTNGXA01.p hx.gbl Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7802 NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
Thanks for Marvin's input,
Hi MR,
For XML Webservice, the request/response document is a standard xml document so all the element in it conform to the XML 1.0/namepsace standards. The prefix you mentioned just actually called namespace prefix which is just an alias of a certain namespace URI, for example:
<element xmlns:ns1="urn: test:method" ....>
the ns1 is just alias of "urn:test:metho d" , so the important value is the "urn:test:metho d" rather than "ns1". We can replace the "ns1" with whatever prefix we like, in other words, the following three ones are identical([1] ,[2] and [3]: [1] <element xmlns:ns1="urn: test:method"> <ns1:sub /> </element>
[2] <element xmlns:ns3="urn: test:method"> <ns3:sub /> </element>
[3]
<element xmlns="urn:test :method"> <sub /> </element>
So for your scenario, if your concern is only the namespace prefix, I don't think you need to worry about it. Just set the correct "RequestElement Name" and "RequestNamespa ce" is enough. For example, the following webmethod:
[WebMethod]
[SoapDocumentMet hod(RequestElem entName="submit OrderBatch",Req uestNamespace=" urn:OrderOperat ions", ResponseElement Name="submitOrd erBatchResponse ", ResponseNamespa ce="urn:OrderOp erations"
)]
public string SubmitOrderBatc h() { return "Hello World"; }
will generate the below output:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <submitOrderBat ch xmlns="urn:Orde rOperations" /> </soap:Body> </soap:Envelope>
it is identical to this one in XML perspective:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations " /> </soap:Body> </soap:Envelope>
Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- From: Marvin Smit <ma*********@gm ail.com> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Subject: Re: RequestElementN ame is being changed Date: Tue, 06 Sep 2005 17:04:39 +0200 Message-ID: <pm************ *************** *****@4ax.com> References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> X-Newsreader: Forte Free Agent 3.0/32.763 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: ab***@chello.nl Organization: chello.nl Lines: 77 NNTP-Posting-Host: 62.194.138.116 (62.194.138.116 ) NNTP-Posting-Date: Tue, 06 Sep 2005 17:04:54 +0200 X-Trace: bd352431db0169b 672fd105055 Path:
TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli
ne.de!fr.ip.nds oftware.net!213 .239.142.2.MISM ATCH!feeder.xsn ews.nl!tudelft. n
l!txtfeed2.tude lft.nl!amsnews1 1.chello.com!am snews14.chello. com!news.chello . nl.POSTED!not-for-mail Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7791 X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Hi..
Ehh... AFAIK Axis works using the WSDL, SOAP, XSD, XML standards (WS Stack). Thats essentially what being a WebService is all about. Since this is XML based, the prefix cannot be important. The prefix is nothing else than an 'alias' to the, usualy pretty-, large namespace uri.
If on the other hand the implementation uses string manipulation, regular expressions or anything else than a real XML parser.. it could be a problem.
Hope this helps,
Marvin Smit.
On Tue, 6 Sep 2005 14:15:58 +0300, "MR" <co******@newsg roup.nospam> wrote:
thanks, except that the web service (apache) i am talking to requires that prefix. is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message news:jn****** *************** ***********@4ax .com... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
Why does the string value assigned to the RequestElementN ame in the SoapDocumen tMethodAttribut e get changed?
The value below with a colon is changed to the hex value surrounded by underscores . this doesn't happen to the RequestNameSpac e.
How can i prevent it from being changed?
thanks
m [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
("",
RequestElem entName = @"ns1:submitOrd erBatch",
RequestName space="urn:Orde rOperations", Use=System. Web.Services.De scription.SoapB indingUse.Liter al,
ParameterSt yle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
the SOAP body then contains: <ns1_x003A_subm itOrderBatch xmlns="urn: OrderOperations ">
i spoke to a MS developer at the PDC. He explained that the apache server is
using version SOAP 1.0 which is not supported by .NET. So i had to modify
the message after it was de-serialized. it worked
thanks for your help
m
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:iG******** ******@TK2MSFTN GXA01.phx.gbl.. . No problem, if there're any further question, please feel free to post here.
Thanks & Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- From: "MR" <co******@newsg roup.nospam> References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> <pm************ *************** *****@4ax.com> <FL************ *@TK2MSFTNGXA01 .phx.gbl> <SX************ **@TK2MSFTNGXA0 1.phx.gbl> Subject: Re: RequestElementN ame is being changed Date: Fri, 9 Sep 2005 13:54:33 +0300 Lines: 241 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Message-ID: <uw************ **@TK2MSFTNGP10 .phx.gbl> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices NNTP-Posting-Host: hevron.biconix. com 62.90.12.234 Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7847 X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
i am on my way to the PDC, so i'm not sure when i will get t test this out. i will let you know what i find thank you very much m
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message news:SX******** ******@TK2MSFTN GXA01.phx.gbl.. . Hi MR,
How are you doing on this issue, have you got any further ideas? If there're anything else we can help, please feel free to post here. Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- X-Tomcat-ID: 85562976 References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> <pm************ *************** *****@4ax.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_0001 _8F1872AD" Content-Transfer-Encoding: 7bit From: st*****@online. microsoft.com (Steven Cheng[MSFT]) Organization: Microsoft Date: Wed, 07 Sep 2005 02:46:25 GMT Subject: Re: RequestElementN ame is being changed X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices Message-ID: <FL************ *@TK2MSFTNGXA01 .phx.gbl> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Lines: 308 Path: TK2MSFTNGXA01.p hx.gbl Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7802 NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
Thanks for Marvin's input,
Hi MR,
For XML Webservice, the request/response document is a standard xml document so all the element in it conform to the XML 1.0/namepsace standards. The prefix you mentioned just actually called namespace prefix which is just an alias of a certain namespace URI, for example:
<element xmlns:ns1="urn: test:method" ....>
the ns1 is just alias of "urn:test:metho d" , so the important value is the "urn:test:metho d" rather than "ns1". We can replace the "ns1" with whatever prefix we like, in other words, the following three ones are identical([1] ,[2] and [3]: [1] <element xmlns:ns1="urn: test:method"> <ns1:sub /> </element>
[2] <element xmlns:ns3="urn: test:method"> <ns3:sub /> </element>
[3]
<element xmlns="urn:test :method"> <sub /> </element>
So for your scenario, if your concern is only the namespace prefix, I don't think you need to worry about it. Just set the correct "RequestElement Name" and "RequestNamespa ce" is enough. For example, the following webmethod:
[WebMethod]
[SoapDocumentMet hod(RequestElem entName="submit OrderBatch",Req uestNamespace=" urn:OrderOperat ions", ResponseElement Name="submitOrd erBatchResponse ", ResponseNamespa ce="urn:OrderOp erations"
)]
public string SubmitOrderBatc h() { return "Hello World"; }
will generate the below output:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <submitOrderBat ch xmlns="urn:Orde rOperations" /> </soap:Body> </soap:Envelope>
it is identical to this one in XML perspective:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations " /> </soap:Body> </soap:Envelope>
Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- From: Marvin Smit <ma*********@gm ail.com> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Subject: Re: RequestElementN ame is being changed Date: Tue, 06 Sep 2005 17:04:39 +0200 Message-ID: <pm************ *************** *****@4ax.com> References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> X-Newsreader: Forte Free Agent 3.0/32.763 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: ab***@chello.nl Organization: chello.nl Lines: 77 NNTP-Posting-Host: 62.194.138.116 (62.194.138.116 ) NNTP-Posting-Date: Tue, 06 Sep 2005 17:04:54 +0200 X-Trace: bd352431db0169b 672fd105055 Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli ne.de!fr.ip.nds oftware.net!213 .239.142.2.MISM ATCH!feeder.xsn ews.nl!tudelft. n l!txtfeed2.tude lft.nl!amsnews1 1.chello.com!am snews14.chello. com!news.chello . nl.POSTED!not-for-mail Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7791 X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Hi..
Ehh... AFAIK Axis works using the WSDL, SOAP, XSD, XML standards (WS Stack). Thats essentially what being a WebService is all about. Since this is XML based, the prefix cannot be important. The prefix is nothing else than an 'alias' to the, usualy pretty-, large namespace uri.
If on the other hand the implementation uses string manipulation, regular expressions or anything else than a real XML parser.. it could be a problem.
Hope this helps,
Marvin Smit.
On Tue, 6 Sep 2005 14:15:58 +0300, "MR" <co******@newsg roup.nospam> wrote:
thanks, except that the web service (apache) i am talking to requires that prefix. is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message news:jn***** *************** ************@4a x.com... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
>Why does the string value assigned to the RequestElementN ame in the >SoapDocume ntMethodAttribu te get changed? > >The value below with a colon is changed to the hex value surrounded by >underscore s. this doesn't happen to the RequestNameSpac e. > >How can i prevent it from being changed? > >thanks > >m > > > >[System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute > >("", > >RequestEle mentName = @"ns1:submitOrd erBatch", > >RequestNam espace="urn:Ord erOperations", > > > >Use=System .Web.Services.D escription.Soap BindingUse.Lite ral, > >ParameterS tyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]> > > >the SOAP body then contains: <ns1_x003A_subm itOrderBatch >xmlns="urn :OrderOperation s"> >
Thanks for your further followup MR,
Glad that you've got it working now.
If there're anything we can help in the future, please always feel free to
post here.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "MR" <co******@newsg roup.nospam>
References: <OQ************ **@TK2MSFTNGP11 .phx.gbl>
<jn************ *************** *****@4ax.com>
<e7************ **@TK2MSFTNGP14 .phx.gbl>
<pm************ *************** *****@4ax.com>
<FL************ *@TK2MSFTNGXA01 .phx.gbl>
<SX************ **@TK2MSFTNGXA0 1.phx.gbl>
<uw************ **@TK2MSFTNGP10 .phx.gbl>
<iG************ **@TK2MSFTNGXA0 1.phx.gbl>
Subject: Re: RequestElementN ame is being changed
Date: Tue, 27 Sep 2005 19:08:03 +0300
Lines: 300
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <OG************ **@TK2MSFTNGP15 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: hevron.biconix. com 62.90.12.234
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP15.phx. gbl
microsoft.publi c.dotnet.framew ork.webservices :8037
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
i spoke to a MS developer at the PDC. He explained that the apache server
is
using version SOAP 1.0 which is not supported by .NET. So i had to modify
the message after it was de-serialized. it worked
thanks for your help
m
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:iG******** ******@TK2MSFTN GXA01.phx.gbl.. . No problem, if there're any further question, please feel free to post here.
Thanks & Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- From: "MR" <co******@newsg roup.nospam> References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> <pm************ *************** *****@4ax.com> <FL************ *@TK2MSFTNGXA01 .phx.gbl> <SX************ **@TK2MSFTNGXA0 1.phx.gbl> Subject: Re: RequestElementN ame is being changed Date: Fri, 9 Sep 2005 13:54:33 +0300 Lines: 241 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Message-ID: <uw************ **@TK2MSFTNGP10 .phx.gbl> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices NNTP-Posting-Host: hevron.biconix. com 62.90.12.234 Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7847 X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
i am on my way to the PDC, so i'm not sure when i will get t test this out. i will let you know what i find thank you very much m
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message news:SX******** ******@TK2MSFTN GXA01.phx.gbl.. . Hi MR,
How are you doing on this issue, have you got any further ideas? If there're anything else we can help, please feel free to post here. Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- X-Tomcat-ID: 85562976 References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> <pm************ *************** *****@4ax.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_0001 _8F1872AD" Content-Transfer-Encoding: 7bit From: st*****@online. microsoft.com (Steven Cheng[MSFT]) Organization: Microsoft Date: Wed, 07 Sep 2005 02:46:25 GMT Subject: Re: RequestElementN ame is being changed X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices Message-ID: <FL************ *@TK2MSFTNGXA01 .phx.gbl> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Lines: 308 Path: TK2MSFTNGXA01.p hx.gbl Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7802 NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
Thanks for Marvin's input,
Hi MR,
For XML Webservice, the request/response document is a standard xml document so all the element in it conform to the XML 1.0/namepsace standards. The prefix you mentioned just actually called namespace prefix which is just an alias of a certain namespace URI, for example:
<element xmlns:ns1="urn: test:method" ....>
the ns1 is just alias of "urn:test:metho d" , so the important value is the "urn:test:metho d" rather than "ns1". We can replace the "ns1" with whatever prefix we like, in other words, the following three ones are identical([1] ,[2] and [3]: [1] <element xmlns:ns1="urn: test:method"> <ns1:sub /> </element>
[2] <element xmlns:ns3="urn: test:method"> <ns3:sub /> </element>
[3]
<element xmlns="urn:test :method"> <sub /> </element>
So for your scenario, if your concern is only the namespace prefix, I don't think you need to worry about it. Just set the correct "RequestElement Name" and "RequestNamespa ce" is enough. For example, the following webmethod:
[WebMethod]
[SoapDocumentMet hod(RequestElem entName="submit OrderBatch",Req uestNamespace=" urn:OrderOperat ions", ResponseElement Name="submitOrd erBatchResponse ", ResponseNamespa ce="urn:OrderOp erations"
)]
public string SubmitOrderBatc h() { return "Hello World"; }
will generate the below output:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <submitOrderBat ch xmlns="urn:Orde rOperations" /> </soap:Body> </soap:Envelope>
it is identical to this one in XML perspective:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"> <soap:Body> <ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations " /> </soap:Body> </soap:Envelope>
Thanks,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
-------------------- From: Marvin Smit <ma*********@gm ail.com> Newsgroups: microsoft.publi c.dotnet.framew ork.webservices Subject: Re: RequestElementN ame is being changed Date: Tue, 06 Sep 2005 17:04:39 +0200 Message-ID: <pm************ *************** *****@4ax.com> References: <OQ************ **@TK2MSFTNGP11 .phx.gbl> <jn************ *************** *****@4ax.com> <e7************ **@TK2MSFTNGP14 .phx.gbl> X-Newsreader: Forte Free Agent 3.0/32.763 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: ab***@chello.nl Organization: chello.nl Lines: 77 NNTP-Posting-Host: 62.194.138.116 (62.194.138.116 ) NNTP-Posting-Date: Tue, 06 Sep 2005 17:04:54 +0200 X-Trace: bd352431db0169b 672fd105055 Path:
TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!ne wsfeed00.sul.t-online.de!t-onli
ne.de!fr.ip.nds oftware.net!213 .239.142.2.MISM ATCH!feeder.xsn ews.nl!tudelft. n
l!txtfeed2.tude lft.nl!amsnews1 1.chello.com!am snews14.chello. com!news.chello . nl.POSTED!not-for-mail Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.framew ork.webservices :7791 X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices
Hi..
Ehh... AFAIK Axis works using the WSDL, SOAP, XSD, XML standards (WS Stack). Thats essentially what being a WebService is all about. Since this is XML based, the prefix cannot be important. The prefix is nothing else than an 'alias' to the, usualy pretty-, large namespace uri.
If on the other hand the implementation uses string manipulation, regular expressions or anything else than a real XML parser.. it could be a problem.
Hope this helps,
Marvin Smit.
On Tue, 6 Sep 2005 14:15:58 +0300, "MR" <co******@newsg roup.nospam> wrote:
thanks, except that the web service (apache) i am talking to requires that prefix. is there a workaround?
"Marvin Smit" <ma*********@gm ail.com> wrote in message news:jn***** *************** ************@4a x.com... Hi,
you don't have the control over the prefix use. With the two attributes you're almost right. Just remove the prefix from the values. So,
[SoapDocumentMet hod( RequestElementN ame="submitOrde rBatch", RequestNamespac e="urn:OrderOpe rations")]
should do it.
Hope this helps,
Marvin Smit
On Tue, 6 Sep 2005 13:34:31 +0300, "MR" <co******@newsg roup.nospam> wrote:
>Why does the string value assigned to the RequestElementN ame in the >SoapDocume ntMethodAttribu te get changed? > >The value below with a colon is changed to the hex value surrounded by >underscore s. this doesn't happen to the RequestNameSpac e. > >How can i prevent it from being changed? > >thanks > >m > > > >[System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute > >("", > >RequestEle mentName = @"ns1:submitOrd erBatch", > >RequestNam espace="urn:Ord erOperations", > > > >Use=System .Web.Services.D escription.Soap BindingUse.Lite ral, > >ParameterS tyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]> > > >the SOAP body then contains: <ns1_x003A_subm itOrderBatch >xmlns="urn :OrderOperation s"> > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Glenn |
last post by:
I have just started using the FileSystemWatcher in VB.NET. My first attempt
was to connect to a share, using unc paths, to a server running Win2000.
Everything was working great for about two days. Today, at about 6:30am
pst, the program stopped working. At first I thought it was the program, so
I put in some console.writeline statements to...
|
by: Doug R |
last post by:
Hello,
I could use a little help from you Gurus out there. I have an aplication
that watches a directory and detects when a PGP encrypted file lands in the
directory and starts a process that decrypts it and parses the resulting
contents. I am using the FileSystemWatcher's Created event to detect when
the file arrives. The problem I have...
|
by: Martin |
last post by:
I have a situation where I'm using XmlHttpRequests to update some data
in a table every few seconds. The script that executes when the data
comes into the browser checks to see if the data has changed compared
to that currently displayed - if it hasn't changed, it does not update
anything.
I'm having a problem on ONE single computer in that...
|
by: Brett |
last post by:
I'd like to create a small client app that sits on a user's computer and
monitors their FTP activity to one certain server. The client app will
update a server app that then distributes this information to all client
apps. This means if 5 people are using the client app and are accessing the
server via FTP, they will see which files are...
|
by: grayaii |
last post by:
Hi,
I have a simple form that handles all its paint functionality like so:
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.Opaque, true);
And the entry point to this program is like so:
static void Main()
{
| |
by: andrew |
last post by:
Does anyone know of a fix to the follwoing issue.
I am referencing a third party WSDL in .net1.1
The resulting reference.cs produces a method where the
RequestElementName is the same value as ResponseElementName (as below)
This surfaces in an error on construction of the class.
If I alter the RequestElementName to something different the...
|
by: tomb |
last post by:
I'm using VB.net 2003 and a FileSystemWatcher. The Changed event gets
called twice for every change in the folder I'm watching. To build the
functionality, I'm manually changing a text file. As soon as I save the
changed file, the event is called, which is great. But then the event
is called again almost immediately. That causes some...
|
by: Andy B |
last post by:
Is there a way that is already built into .net 3.5 that will let me protect
an object from being modified when the object is public?
|
by: sos314 |
last post by:
I have a web form that is being populated via a dataset that's returned from a web service. i'm trying to find the most efficient way to catch any fields that the user has changed in the form when they click submit so that I can email only the changed fields to an admin. i'm trying to avoid doing a second webservice call to get a dataset to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |