Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 39070 invoked from network); 3 Feb 2004 17:36:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Feb 2004 17:36:45 -0000 Received: (qmail 62303 invoked by uid 500); 3 Feb 2004 17:36:09 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 62267 invoked by uid 500); 3 Feb 2004 17:36:08 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 62178 invoked from network); 3 Feb 2004 17:36:07 -0000 Received: from unknown (HELO tesla.cogentlogic.com) (66.163.12.83) by daedalus.apache.org with SMTP; 3 Feb 2004 17:36:07 -0000 Received: from THESIGER ([10.0.0.12]) by tesla.cogentlogic.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id DM9VTFGF; Tue, 3 Feb 2004 12:25:20 -0500 Message-ID: <00f101c3ea7b$d0b314a0$0c00000a@thesiger> From: "Jeff" To: References: <20040203171603.74050.qmail@web41112.mail.yahoo.com> Subject: Re: sending xml files as string parameters Date: Tue, 3 Feb 2004 12:33:19 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00EE_01C3EA51.E7B56060" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_00EE_01C3EA51.E7B56060 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Brian, This is just a shot in the dark but have you tried using = setFullTargetObjectURI instead of setTargetObjectURI? I don't find it odd that there's an Axis/JWSDP disconnect! There is too = little effort put in to XML Schema-related tools. I'm not criticizing = Apache here: active contributors do a great job with limited resources. = Instead, consider that company with limitless resources that had a large = hand in creating XML Schema: apparently, they have a technology called = .NET. I produced an Axis/XchainJ-based web service recently that was an = Open GIS Consortium 'Sensor Collection Service'. The WSDL file = references an XML Schema comprised of 54 XML Schema documents (GML, = XLink, ISO...). Some users wanted to use .NET. Apparently there's a .NET = tool called WSDL.EXE that is supposed to generate client code from WSDL = files _but_ it will not recurse through a hierarchy of XML Schema = documents =3D> useless for all but the most trivial of cases. = Interestingly someone has tried to address this problem but their = solution cannot handle more than one XML Schema document targeting the = same namespace (in GML 3, for example, there are 27 XML Schema documents = that target the one GML namespace!) =3D> useless for all but the most = trivial of cases, again! This stuff is still bleeding-edge :-) Jeff ----- Original Message -----=20 From: Brian Shields=20 To: axis-user@ws.apache.org=20 Sent: Tuesday, February 03, 2004 12:16 PM Subject: Re: sending xml files as string parameters Thanks Jeff, Obviously ns1 is not a default namespace, but a default variable name = for the urn:Foo namespace. this is what i meant. I set urn:Foo as the = namespace by using the setTargetObjectURI method of the = org.apache.soap.rpc.Call class. I just find it odd that it works = perfectly when sent to an Axis deployed service and falls down when sent = to a JWSDP deployed service! Brian. Jeff wrote:=20 Hi! Clearly, the error message identifies the problem as the the opening = tag of xmlFileParameter element. Since you are using UTF-8, the error is = obviously not due to character encoding. The only other issue that comes = to mind is the absence of a namespace: I'm speculating that JWSDP may = not be able to handle this. This guess could be wrong but what else can = you try? By definition, a prefix, in this case ns1, does not reference a = default namespace! As to how you add the xmlns=3D"urn:Foo" attribute to the = xmlFileParameter element, I don't know. I gave up on Axis payload = generation a while back because WSDL2Java has too many problems (I use a = commercial product to generate the payload and Axis to wrap it in SOAP = and handle message transmission/reception). Jeff ----- Original Message -----=20 From: Brian Shields=20 To: axis-user@ws.apache.org=20 Sent: Tuesday, February 03, 2004 10:40 AM Subject: Re: sending xml files as string parameters How? that is an automatically generated SOAP message. I am simple = creating a parameter...("xmlFileParameter, String.class, xmlFile, = Constants.NS_URI_SOAP_ENC); where xmlFile is the string containing the = xml file! II presume ns1 is a default namespace?? Brian Jeff wrote: Try using: <?xml = version=3D"1.0" encoding=3D"UTF-8"?> <PurchaseOrder = xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" = xsi:noNamespaceSchemaLocation=3D"po.xsd"> <poNumber>jfd</poNumber> <shipTo> <name>Alice Smith</name> <street>123 Maple Street</street> <town-city>Mill Valley</town-city> <state-county>CA</state-county> <country>USA</country> </shipTo> <billTo> <name>Robert Smith</name> <street>8 Oak Avenue</street> <town-city>Old Town</town-city> <state-county>PA</state-county> <country>USA</country> </billTo> <comment>Hurry, my lawn is going = wild!</comment> <items> <item partNum=3D"872-AA"> <productName>Lawnmower</productName> <quantity>2</quantity> <USPrice>12.12</USPrice> <comment>Confirm this is = electric</comment> </item> <item partNum=3D"926-AA"> <productName>Baby = Monitor</productName> <quantity>1</quantity> <USPrice>390.98</USPrice> </item> <totalPrice>294.18</totalPrice> <shipDate>2001-01-05</shipDate> </items> </PurchaseOrder> This one is really confusing me!! anyone have any ideas? Thanks, Brian ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! -------------------------------------------------------------------------= - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! -------------------------------------------------------------------------= ----- Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! ------=_NextPart_000_00EE_01C3EA51.E7B56060 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Brian,
 
This is just a shot in the dark but = have you tried=20 using setFullTargetObjectURI instead of setTargetObjectURI?
 
I don't find it odd that there's an = Axis/JWSDP=20 disconnect! There is too little effort put in to XML Schema-related = tools. I'm=20 not criticizing Apache here: active contributors do a great job with = limited=20 resources. Instead, consider that company with limitless resources that = had a=20 large hand in creating XML Schema: apparently, they have a technology = called=20 .NET. I produced an Axis/XchainJ-based web service recently that was an = Open GIS=20 Consortium 'Sensor Collection Service'. The WSDL file references an XML = Schema=20 comprised of 54 XML Schema documents (GML, XLink, ISO...). Some users = wanted to=20 use .NET. Apparently there's a .NET tool called WSDL.EXE that is = supposed to=20 generate client code from WSDL files _but_ it will not recurse = through a=20 hierarchy of XML Schema documents =3D> useless for all but the most = trivial of=20 cases. Interestingly someone has tried to address this problem but their = solution cannot handle more than one XML Schema document targeting the = same=20 namespace (in GML 3, for example, there are 27 XML Schema documents that = target=20 the one GML namespace!) =3D> useless for all but the most trivial of = cases,=20 again!
 
This stuff is still bleeding-edge = :-)
 
 
Jeff
 
 
----- Original Message -----
From:=20 Brian=20 Shields
Sent: Tuesday, February 03, = 2004 12:16=20 PM
Subject: Re: sending xml files = as string=20 parameters

Thanks Jeff,
Obviously ns1 is not a default namespace, but a default variable = name for=20 the urn:Foo namespace. this is what i meant. I set urn:Foo as the = namespace by=20 using the setTargetObjectURI method of the org.apache.soap.rpc.Call = class. I=20 just find it odd that it works perfectly when sent to an Axis deployed = service=20 and falls down when sent to a JWSDP deployed service!
Brian.


Jeff = <jeff@cogentlogic.com>=20 wrote:=20
Hi!
 
Clearly, the error message = identifies the=20 problem as the the opening tag of xmlFileParameter element. Since = you are=20 using UTF-8, the error is obviously not due to character encoding. = The only=20 other issue that comes to mind is the absence of a namespace: I'm=20 speculating that JWSDP may not be able to handle this. This = guess could=20 be wrong but what else can you try?
 
By definition, a prefix, in this = case ns1, does=20 not reference a default namespace!
 
As to how you add = the xmlns=3D"urn:Foo"=20 attribute to the xmlFileParameter element, I don't know. I gave up = on Axis=20 payload generation a while back because WSDL2Java has too many = problems (I=20 use a commercial product to generate the payload and Axis to wrap it = in SOAP=20 and handle message transmission/reception).
 
 
Jeff
 
 
----- Original Message ----- =
From:=20 Brian=20 Shields
Sent: Tuesday, February 03, = 2004=20 10:40 AM
Subject: Re: sending xml = files as=20 string parameters

How? that is an automatically generated SOAP message. I am = simple=20 creating a parameter...("xmlFileParameter, String.class, xmlFile,=20 Constants.NS_URI_SOAP_ENC); where xmlFile is the string containing = the xml=20 file! II presume ns1 is a default namespace??
Brian

Jeff <jeff@cogentlogic.com>= =20 wrote:
Try using:
 
<ns1:xmlFileParameter ...
 
 
Jeff
 
----- Original Message ----- =
From:=20 Brian=20 Shields
To: axis-user@ws.apache.org=20
Sent: Tuesday, February = 03, 2004=20 10:11 AM
Subject: sending xml = files as=20 string parameters

Hi all,
I am trying to send an = xml=20 file as a parameter in a web service call. This xml file is in = string=20 form. I have created the string using the XMLOutputter class = from the=20 jdom.output package. I send this to another locally hosted = service,=20 also deployed using axis, and everything works fine. I can = create a=20 jdom Document from the string. However when i send the request = to a=20 remotely hosted JWSDP deployed service i am getting an error. = The=20 error is:
deserialization error: = unexpected XML reader state. expected: END but found: START:=20 xmlFileParameter
where xmlFileParameter = is the=20 name of the Parameter added to the=20 call.
I have caught the soap = message=20 arriving at the service, it is as=20 following:
POST /LimaR/interface=20 HTTP/1.0
Host:=20 127.0.0.1
Content-Type: = text/xml;=20 charset=3Dutf-8
Content-Length:=20 2037
SOAPAction:=20 ""
<?xml = version=3D'1.0'=20 encoding=3D'UTF-8'?>
<SOAP-ENV:Envelope=20 xmlns:SOAP-ENV=3D"http://schemas.xmlsoap= .org/soap/envelope/"=20 xmlns:xsi=3D"http://www.w3.org/2001= /XMLSchema-instance"=20 xmlns:xsd=3D"http://www.w3.org/2001/XMLSchem= a">
<SOAP-ENV:Body>
<ns1:acceptXMLOrder = xmlns:ns1=3D"urn:Foo" SOAP-ENV:encodingStyle=3D"http://schemas.xmlsoap= .org/soap/encoding/">
<xmlFileParameter=20 xsi:type=3D"xsd:string">&lt;?xml = version=3D&quot;1.0&quot;=20 = encoding=3D&quot;UTF-8&quot;?&gt;
&lt;PurchaseOrder=20 = xmlns:xsi=3D&quot;http://www.w3.org/2001/XMLSchema-instance&quot;= =20 = xsi:noNamespaceSchemaLocation=3D&quot;po.xsd&quot;&gt;
&nb= sp;  =20 = &lt;poNumber&gt;jfd&lt;/poNumber&gt;
   = ;=20 = &lt;shipTo&gt;
       =20 &lt;name&gt;Alice=20 = Smith&lt;/name&gt;
        = &lt;street&gt;123 Maple=20 = Street&lt;/street&gt;
      &nbs= p;=20 &lt;town-city&gt;Mill=20 = Valley&lt;/town-city&gt;
      &= nbsp;=20 = &lt;state-county&gt;CA&lt;/state-county&gt;
 &nbs= p;     =20 = &lt;country&gt;USA&lt;/country&gt;
    = &lt;/shipTo&gt;
   =20 = &lt;billTo&gt;
       =20 &lt;name&gt;Robert=20 = Smith&lt;/name&gt;
        = &lt;street&gt;8 Oak=20 = Avenue&lt;/street&gt;
      &nbs= p;=20 &lt;town-city&gt;Old=20 = Town&lt;/town-city&gt;
      &nb= sp;=20 = &lt;state-county&gt;PA&lt;/state-county&gt;
 &nbs= p;     =20 = &lt;country&gt;USA&lt;/country&gt;
    = &lt;/billTo&gt;
   =20 &lt;comment&gt;Hurry, my lawn is going=20 wild!&lt;/comment&gt;
   =20 = &lt;items&gt;
       =20 &lt;item=20 = partNum=3D&quot;872-AA&quot;&gt;
    &= nbsp;      =20 = &lt;productName&gt;Lawnmower&lt;/productName&gt;
 = ;          =20 = &lt;quantity&gt;2&lt;/quantity&gt;
   &= nbsp;       =20 = &lt;USPrice&gt;12.12&lt;/USPrice&gt;
   = ;        =20 &lt;comment&gt;Confirm this is=20 = electric&lt;/comment&gt;
      &= nbsp;=20 = &lt;/item&gt;
       =20 &lt;item=20 = partNum=3D&quot;926-AA&quot;&gt;
    &= nbsp;      =20 &lt;productName&gt;Baby=20 = Monitor&lt;/productName&gt;
     &nbs= p;     =20 = &lt;quantity&gt;1&lt;/quantity&gt;
   &= nbsp;       =20 = &lt;USPrice&gt;390.98&lt;/USPrice&gt;
  &nbs= p;    =20 = &lt;/item&gt;
       =20 = &lt;totalPrice&gt;294.18&lt;/totalPrice&gt;
 &nbs= p;     =20 = &lt;shipDate&gt;2001-01-05&lt;/shipDate&gt;
 &nbs= p; =20 = &lt;/items&gt;
&lt;/PurchaseOrder&gt;
</xmlFileParameter>
</ns1:acceptXMLOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This one is really = confusing=20 me!! anyone have any = ideas?
Thanks,
Brian


Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building = tool. Try=20 it!


Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building = tool. Try=20 it!


Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try=20 it! ------=_NextPart_000_00EE_01C3EA51.E7B56060--