Hi Scott,

We don't set the method name for the call (if I understand you correctly). I am just 
sending this xml to a webservice (literally). If you use TCPMON to see what is sent, 
it SOAP msg looks like:

> <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  <soapenv:Body>
>  <ns1:null xmlns:ns1="" 
> SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml";>
>   <message type="submit">
>     <name>
>       <given_name>John</given_name>
>       <surname>Citizen</surname>
>     </name>
>   </message>
>  </ns1:null >
>  </soapenv:Body>
> </soapenv:Envelope>

If I send it Message-style (as per the samples/messaging example), creating the SOAP 
envelope manually (so to speak), it works.

Cheers, Craig


> -----Original Message-----
> From: Scott Nichol [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 14 April 2004 10:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Help defining namespace
> 
> 
> Where do you set the method name for the call?
> 
> Scott Nichol
> 
> Do not send e-mail directly to this e-mail address,
> because it is filtered to accept only mail from
> specific mail lists.
> ----- Original Message ----- 
> From: "Craig Robinson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 14, 2004 2:10 AM
> Subject: RE: Help defining namespace
> 
> 
> Thanks Scott,
> Sorry for the tardiness in getting back to you, but I have 
> been trying to work this out. In my test client, the DOM gets 
> created as follows:
> 
> try {
>   // Create a builder factory
>   DocumentBuilderFactory factory = 
> DocumentBuilderFactory.newInstance();
>   factory.setValidating(validating);
> 
>   // Create the builder and parse the file
>   Document doc = factory.newDocumentBuilder().parse(new 
> File(filename));
>   return doc; 
> }
> 
> where the file it reads, contains some simple XML like:
> 
> <message type="submit">
>   <name>
>     <given_name>John</given_name>
>     <surname>Citizen</surname>
>   </name>
> </message>
> 
> Therefore, when it gets sent using the method below, it ends 
> up getting sent like:
> 
> <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  <soapenv:Body>
>  <ns1:null xmlns:ns1="" 
> SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml";>
>   <message type="submit">
>     <name>
>       <given_name>John</given_name>
>       <surname>Citizen</surname>
>     </name>
>   </message>
>  </ns1:null >
>  </soapenv:Body>
> </soapenv:Envelope>
> 
> Any help would be greatly appreciated.
> Cheers, Craig
> 
> > -----Original Message-----
> > From: Scott Nichol [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, 6 April 2004 11:02 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Help defining namespace
> > 
> > 
> > Your code looks like what I would expect.  The generated 
> > payload, however, has a root element
> > 
> > <ns1:null xmlns:ns1="" 
> > 
> > which looks like there is neither name nor namespace on the 
> > root Element.  It seems like the DOM Element probably has no 
> > namespace.  How do you create the DOM in the first place?
> > 
> > Scott Nichol
> > 
> > Do not send e-mail directly to this e-mail address,
> > because it is filtered to accept only mail from
> > specific mail lists.
> > ----- Original Message ----- 
> > From: "Craig Robinson" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, April 05, 2004 6:37 PM
> > Subject: Help defining namespace
> > 
> > 
> > Hi,
> > This may seem like a very basic question, but I am stumped. 
> > Hope someone can help! I have an XML DOM document which I 
> > need to send to a web service from a message driven bean.  
> > The appropriate code snippet that I am using is:
> > 
> > Element message = doc.getDocumentElement();
> > Call call = new Call ();
> > call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML );
> > Vector params = new Vector ();
> > params.addElement (new Parameter("message", Element.class, 
> > message, Constants.NS_URI_LITERAL_XML));
> > call.setParams (params);
> > URL url = new URL ("http://localhost:8080/webservice/";);
> > Response resp = call.invoke (url, "");
> > 
> > It sends a message like:
> > 
> > <SOAP-ENV:Envelope ...>
> > <SOAP-ENV:Body>
> > <ns1:null xmlns:ns1="" 
> > SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml";>
> > ...DOM Document...
> > </ns1:null>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> > 
> > What I need to do is define a namespace like:
> > 
> > <ns1:AMessage xmlns:ns1="http://myurl"; 
> > SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml";>
> > 
> > How do I do this? Any help would be greatly appreciated.
> > 
> > Cheers, Craig
> > 
> > Craig Robinson
> > Information Systems Unit
> > Corporate Development Division
> > Environmental Protection Agency
> > 
> > Ph: (07) 3006 4629
> > Fax:  (07) 3227 6534
> > Mobile: 0411 477 921
> > E-mail: [EMAIL PROTECTED]
> > 
> > Visit us online at www.epa.qld.gov.au
> > 
> > 
> > 
> > ___________________________
> > Disclaimer
> > 
> > This e-mail, including attachments if any, has originated 
> > from a Queensland government agency and may contain 
> > information that is confidential, or covered by legal 
> > professional privilege, and is intended for the named 
> > recipient(s) only.  If you have received this message in 
> > error, you are asked to inform the sender as quickly as 
> > possible and delete this message and any copies of this 
> > message from your computer system network.
> > 
> > Any form of disclosure, modification, distribution and/or 
> > publication of this e-mail, including attachments is 
> > prohibited.  Unless otherwise stated, this e-mail, including 
> > attachments represents the views of the sender and not the 
> > views of the Environmental Protection Agency.
> > 
> > Although this e-mail has been checked for the presence of 
> > computer viruses, the Environmental Protection Agency 
> > provides no warranty that all possible viruses have been 
> > detected and cleaned.  Any use of this e-mail could harm your 
> > computer system.
> > ___________________________
> > 
> > 
> > 
> 
> 
> 
> ___________________________
> Disclaimer
> 
> This e-mail, including attachments if any, has originated 
> from a Queensland government agency and may contain 
> information that is confidential, or covered by legal 
> professional privilege, and is intended for the named 
> recipient(s) only.  If you have received this message in 
> error, you are asked to inform the sender as quickly as 
> possible and delete this message and any copies of this 
> message from your computer system network.
> 
> Any form of disclosure, modification, distribution and/or 
> publication of this e-mail, including attachments is 
> prohibited.  Unless otherwise stated, this e-mail, including 
> attachments represents the views of the sender and not the 
> views of the Environmental Protection Agency.
> 
> Although this e-mail has been checked for the presence of 
> computer viruses, the Environmental Protection Agency 
> provides no warranty that all possible viruses have been 
> detected and cleaned.  Any use of this e-mail could harm your 
> computer system.
> ___________________________
> 
> 
> 



___________________________
Disclaimer

This e-mail, including attachments if any, has originated from a Queensland government 
agency and may contain information that is confidential, or covered by legal 
professional privilege, and is intended for the named recipient(s) only.  If you have 
received this message in error, you are asked to inform the sender as quickly as 
possible and delete this message and any copies of this message from your computer 
system network.

Any form of disclosure, modification, distribution and/or publication of this e-mail, 
including attachments is prohibited.  Unless otherwise stated, this e-mail, including 
attachments represents the views of the sender and not the views of the Environmental 
Protection Agency.

Although this e-mail has been checked for the presence of computer viruses, the 
Environmental Protection Agency provides no warranty that all possible viruses have 
been detected and cleaned.  Any use of this e-mail could harm your computer system.
___________________________

Reply via email to