You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by "Siddharth Rath (sirath)" <si...@cisco.com> on 2003/04/28 20:30:49 UTC

RE: Payload - XML translator problem - Socket Connection Query

Hi Scott,
The request and responses for soap 2.3.1 is given below.

Request :

<?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body>
<ns1:doTranslate xmlns:ns1="urn:tran"> <caller xsi:type="xsd:string"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">en_ja
:translate:3:J-TAC:C:U:Shift_JIS:mtdev.cisco.com:1</caller> <strSource
xsi:type="xsd:string"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">&lt;?
xml
version=&quot;1.0&quot;?&gt;&lt;note&gt;&lt;to&gt;Marie&lt;/to&gt;&lt;fr
om&gt;Kelman&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;body
&gt;Don&apos;t forget to buy another 300
IBM!&lt;/body&gt;&lt;/note&gt;</strSource> </ns1:doTranslate>
</SOAP-ENV:Body> </SOAP-ENV:Envelope> 

Response :

<?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body>
<ns1:doTranslateResponse xmlns:ns1="urn:tran"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:string">&lt;?xml
version=&quot;1.0&quot;?&gt;&lt;note&gt;&lt;to&gt;Marie&lt;/to&gt;&lt;fr
om&gt;Kelman&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;body
&gt;Don&apos;t forget to buy another 300
IBM!&lt;/body&gt;&lt;/note&gt;</return> </ns1:doTranslateResponse>
</SOAP-ENV:Body> </SOAP-ENV:Envelope>

And I can get the reqd output too on browser which I was not getting
with 23rd Apr nightly build.

I've one query and if you please spare some time to write two lines
It will be really great.
Is there any substitution for Sockect connection in Java in SOAP that's
Is there any method in the API that will connect to a server over a
specific port.
I cant get this detail on net .

Thanx for helping us  and also thanx in advance.

Thanx and regards
Sidd


-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com] 
Sent: Friday, April 25, 2003 3:31 PM
To: soap-dev@ws.apache.org; soap-user@ws.apache.org
Subject: RE: Payload - XML translator problem


Thanks.  I am also curious about the payloads when the call works, 
i.e. when you use soap 2.3.1.

On 25 Apr 2003 at 15:23, Siddharth Rath (sirath) wrote:

> Hi Scott,
> Thanx for extending your help.
> I'll try to get the Shift_JIS encoding done as
> Per the example you provided and will let you know
> Reg the same.
> Herewith I'm attaching the pay-loads that I got after I used The 
> 23rdApr nightly build. The doc has sample input and the Corresponding 
> pay-loads.
> 
> Thanx and regards
> Sidd
> 
> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> Sent: Friday, April 25, 2003 2:09 PM
> To: soap-user@ws.apache.org; soap-dev@ws.apache.org
> Subject: RE: Payload - XML translator problem
> 
> 
> The attached is an addressbook sample I hacked up a while ago to try
> to get utf-7 encoding.  I forget whether it changed the HTTP Content-
> Type header, the XML declaration, or both.
> 
> On 25 Apr 2003 at 11:35, Siddharth Rath (sirath) wrote:
> 
> > Hi Scott,
> > I've used 23rdApr nightly build and 've faced the problem. The one
> > that's working fine now is soap-2.3.1 . Since I've to stop JVM for 
> > redeployment of 23rdApr nightly Build version ,I'll do the same this

> > evening and will send You the pay-loads.
> > 
> > I've got one query and it will be great if you please spare Some 
> > time
> > to see to this: I need to set the encoding to Shift_JIS in place of
> > UTF-8 that's 
> > <?xml version='1.0' encoding='Shift_JIS'?>
> > Inplace of 
> > <?xml version='1.0' encoding='UTF-8'?>
> > In the response pay-load. Is it possible to set the same.
> > 
> > Thanx and regards
> > Sidd
> > -----Original Message-----
> > From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> > Sent: Friday, April 25, 2003 10:17 AM
> > To: soap-dev@ws.apache.org; soap-user@ws.apache.org
> > Subject: RE: Payload - XML translator problem
> > 
> > 
> > Sidd,
> > 
> > I would like to fix this issue in the nightly build.  Do you know 
> > what version of Apache SOAP is the soap.jar that works?  Can you 
> > post
> > 
> > the request and response dumps for the working call?  Finally, if 
> > you
> > 
> > can provide code for the service method you are calling, that would 
> > be great.
> > 
> > Thanks.
> > 
> > On 24 Apr 2003 at 14:23, Siddharth Rath (sirath) wrote:
> > 
> > > Hi !!
> > > I'd deployed the latest nightly build soap.jar file and hence I 
> > > was getting the error and when I redeployed the old soap.jar  the
> problem
> > > got resolved.
> > >  
> > > Thanx
> > > Sidd
> > > 
> > > -----Original Message-----
> > > From: Siddharth Rath (sirath) [mailto:sirath@cisco.com]
> > > Sent: Thursday, April 24, 2003 12:08 PM
> > > To: soap-user@ws.apache.org; 'Soap-Dev'
> > > Cc: 'Akhil Jain'
> > > Subject: Payload - XML translator problem
> > > 
> > > 
> > > Hi !!
> > > I'm new to new to SOAP and
> > > I'm facing a problem with XML-Payload. Probably with XML 
> > > translator
> > > of SOAP or I'm missing some encoding part for response.
> > > I'm using Apache SOAP. And I'm sending a string thru SOAP and as a
> > > response
> > > Also receiving a string. When I'm sending the string that's
reading
> > from
> > > an
> > > XML file , the XML translator translates the same and I'm getting 
> > > "
> > &lt;
> > > " like
> > > Characters in stead of " < " . But when I receive the same in
> > > service
> > "
> > > &lt; "
> > > Vanishes and I'm getting error as Invalid at the top level of the
> > > document. Error processing resource .... . Herewith giving the 
> > > source and request and responses : Please advise me where things
are
> 
> > > going wrong.
> > >  
> > > Source :
> > > <?xml version="1.0"?>
> > > <note>
> > > <to>Marie</to>
> > > <from>Kelman</from>
> > > <heading>Reminder</heading>
> > > <body>Don't forget to buy another 300 IBM!</body>
> > > </note>
> > >  
> > > Request :
> > > Content-Type: text/xml;charset=utf-8
> > > Content-Length: 828 SOAPAction: "" Accept-Encoding: gzip <?xml
> > > version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:xsd=http://www.w3.org/2001/XMLSchema
> > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > > <SOAP-ENV:Body>
> > > <ns1:doTranslate xmlns:ns1="urn:tran">
> > > <caller xsi:type="xsd:string" 
> > > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > >
> > > Sidd</caller>
> > > <strSource xsi:type="xsd:string" 
> > >
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">&
> > lt
> > ;?
> > > xml
> > >
> > version=&quot;1.0&quot;?&gt;&lt;note&gt;&lt;to&gt;Marie&lt;/to&gt;&l
> > t;
> > fr
> > >
> > om&gt;Kelman&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;
> > bo
> > dy
> > > &gt;Don&apos;t forget to buy another 300
> > > IBM!&lt;/body&gt;&lt;/note&gt;</strSource>
> > > </ns1:doTranslate>
> > > </SOAP-ENV:Body></SOAP-ENV:Envelope>
> > >  
> > > Response :
> > > HTTP/1.0 200 OK Content-Type: text/xml;charset=utf-8
> > > Accept-Encoding:
> > > gzip Content-Length: 570
> > > Set-Cookie: JSESSIONID=ihs916jom1;Path=/translate_2 Date: Thu, 24
> Apr
> > > 2003 18:58:22 GMT
> > > Server: Tomcat Web Server/3.3.1 Final ( JSP 1.1; Servlet 2.2 ) 
> > > <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > > <SOAP-ENV:Body>
> > > <ns1:doTranslateResponse xmlns:ns1="urn:tran"
> > >
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > > <return xsi:type="xsd:string">?xml
> > >
> > version=1.0?notetoMarie/tofromKelman/fromheadingReminder/headingbody
> > Do
> > nt
> > > forget to buy another 300 IBM!/body/note</return>
> > > </ns1:doTranslateResponse> </SOAP-ENV:Body>
> > > </SOAP-ENV:Envelope>
> > >  
> > >  
> > > 
> > > 
> > 
> > 
> > Scott Nichol
> > 
> > Do not reply directly to this e-mail address,
> > as it is filtered to only receive e-mail from
> > specific mailing lists.
> > 
> > 
> > 
> > 
> 
> 
> Scott Nichol
> 
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
> 
> 
> 


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.




RE: Payload - XML translator problem - Socket Connection Query

Posted by Scott Nichol <sn...@scottnichol.com>.
Sidd,

Thanks so much for your diligence in getting me the request and 
response information.  Unfortunately, I am unable to reproduce the 
problem.  This may be due to the particulars of your service code or 
differences in our environments (for instance, I use Tomcat 4.0.1, 
while you appear to use 3.3.1).

I have attached the code I used to explore this.  The purpose is to 
duplicate the request and response messages you are sending.  You 
will see that the service has String doTranslate(String caller, 
String strSource), and that the client is hard-coded to send the 
parameter strings shown in your captures.  If you would be able to 
compile, install, deploy and test this on your setup, we would be 
able to narrow the search for the problem.  If you have time to do 
this, let me know the results.

Thanks again.


On 28 Apr 2003 at 11:30, Siddharth Rath (sirath) wrote:

> Hi Scott,
> The request and responses for soap 2.3.1 is given below.
> 
> Request :
> 
> <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body>
> <ns1:doTranslate xmlns:ns1="urn:tran"> <caller xsi:type="xsd:string"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">en_ja
> :translate:3:J-TAC:C:U:Shift_JIS:mtdev.cisco.com:1</caller> <strSource
> xsi:type="xsd:string"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">&lt;?
> xml
> version=&quot;1.0&quot;?&gt;&lt;note&gt;&lt;to&gt;Marie&lt;/to&gt;&lt;fr
> om&gt;Kelman&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;body
> &gt;Don&apos;t forget to buy another 300
> IBM!&lt;/body&gt;&lt;/note&gt;</strSource> </ns1:doTranslate>
> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 
> 
> Response :
> 
> <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body>
> <ns1:doTranslateResponse xmlns:ns1="urn:tran"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="xsd:string">&lt;?xml
> version=&quot;1.0&quot;?&gt;&lt;note&gt;&lt;to&gt;Marie&lt;/to&gt;&lt;fr
> om&gt;Kelman&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;body
> &gt;Don&apos;t forget to buy another 300
> IBM!&lt;/body&gt;&lt;/note&gt;</return> </ns1:doTranslateResponse>
> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
> 
> And I can get the reqd output too on browser which I was not getting
> with 23rd Apr nightly build.
> 
> I've one query and if you please spare some time to write two lines
> It will be really great.
> Is there any substitution for Sockect connection in Java in SOAP that's
> Is there any method in the API that will connect to a server over a
> specific port.
> I cant get this detail on net .
> 
> Thanx for helping us  and also thanx in advance.
> 
> Thanx and regards
> Sidd
> 
> 
> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@scottnichol.com] 
> Sent: Friday, April 25, 2003 3:31 PM
> To: soap-dev@ws.apache.org; soap-user@ws.apache.org
> Subject: RE: Payload - XML translator problem
> 
> 
> Thanks.  I am also curious about the payloads when the call works, 
> i.e. when you use soap 2.3.1.
> 
> On 25 Apr 2003 at 15:23, Siddharth Rath (sirath) wrote:
> 
> > Hi Scott,
> > Thanx for extending your help.
> > I'll try to get the Shift_JIS encoding done as
> > Per the example you provided and will let you know
> > Reg the same.
> > Herewith I'm attaching the pay-loads that I got after I used The 
> > 23rdApr nightly build. The doc has sample input and the Corresponding 
> > pay-loads.
> > 
> > Thanx and regards
> > Sidd
> > 
> > -----Original Message-----
> > From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> > Sent: Friday, April 25, 2003 2:09 PM
> > To: soap-user@ws.apache.org; soap-dev@ws.apache.org
> > Subject: RE: Payload - XML translator problem
> > 
> > 
> > The attached is an addressbook sample I hacked up a while ago to try
> > to get utf-7 encoding.  I forget whether it changed the HTTP Content-
> > Type header, the XML declaration, or both.
> > 
> > On 25 Apr 2003 at 11:35, Siddharth Rath (sirath) wrote:
> > 
> > > Hi Scott,
> > > I've used 23rdApr nightly build and 've faced the problem. The one
> > > that's working fine now is soap-2.3.1 . Since I've to stop JVM for 
> > > redeployment of 23rdApr nightly Build version ,I'll do the same this
> 
> > > evening and will send You the pay-loads.
> > > 
> > > I've got one query and it will be great if you please spare Some 
> > > time
> > > to see to this: I need to set the encoding to Shift_JIS in place of
> > > UTF-8 that's 
> > > <?xml version='1.0' encoding='Shift_JIS'?>
> > > Inplace of 
> > > <?xml version='1.0' encoding='UTF-8'?>
> > > In the response pay-load. Is it possible to set the same.
> > > 
> > > Thanx and regards
> > > Sidd
> > > -----Original Message-----
> > > From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> > > Sent: Friday, April 25, 2003 10:17 AM
> > > To: soap-dev@ws.apache.org; soap-user@ws.apache.org
> > > Subject: RE: Payload - XML translator problem
> > > 
> > > 
> > > Sidd,
> > > 
> > > I would like to fix this issue in the nightly build.  Do you know 
> > > what version of Apache SOAP is the soap.jar that works?  Can you 
> > > post
> > > 
> > > the request and response dumps for the working call?  Finally, if 
> > > you
> > > 
> > > can provide code for the service method you are calling, that would 
> > > be great.
> > > 
> > > Thanks.
> > > 
> > > On 24 Apr 2003 at 14:23, Siddharth Rath (sirath) wrote:
> > > 
> > > > Hi !!
> > > > I'd deployed the latest nightly build soap.jar file and hence I 
> > > > was getting the error and when I redeployed the old soap.jar  the
> > problem
> > > > got resolved.
> > > >  
> > > > Thanx
> > > > Sidd
> > > > 
> > > > -----Original Message-----
> > > > From: Siddharth Rath (sirath) [mailto:sirath@cisco.com]
> > > > Sent: Thursday, April 24, 2003 12:08 PM
> > > > To: soap-user@ws.apache.org; 'Soap-Dev'
> > > > Cc: 'Akhil Jain'
> > > > Subject: Payload - XML translator problem
> > > > 
> > > > 
> > > > Hi !!
> > > > I'm new to new to SOAP and
> > > > I'm facing a problem with XML-Payload. Probably with XML 
> > > > translator
> > > > of SOAP or I'm missing some encoding part for response.
> > > > I'm using Apache SOAP. And I'm sending a string thru SOAP and as a
> > > > response
> > > > Also receiving a string. When I'm sending the string that's
> reading
> > > from
> > > > an
> > > > XML file , the XML translator translates the same and I'm getting 
> > > > "
> > > &lt;
> > > > " like
> > > > Characters in stead of " < " . But when I receive the same in
> > > > service
> > > "
> > > > &lt; "
> > > > Vanishes and I'm getting error as Invalid at the top level of the
> > > > document. Error processing resource .... . Herewith giving the 
> > > > source and request and responses : Please advise me where things
> are
> > 
> > > > going wrong.
> > > >  
> > > > Source :
> > > > <?xml version="1.0"?>
> > > > <note>
> > > > <to>Marie</to>
> > > > <from>Kelman</from>
> > > > <heading>Reminder</heading>
> > > > <body>Don't forget to buy another 300 IBM!</body>
> > > > </note>
> > > >  
> > > > Request :
> > > > Content-Type: text/xml;charset=utf-8
> > > > Content-Length: 828 SOAPAction: "" Accept-Encoding: gzip <?xml
> > > > version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > > xmlns:xsd=http://www.w3.org/2001/XMLSchema
> > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > > > <SOAP-ENV:Body>
> > > > <ns1:doTranslate xmlns:ns1="urn:tran">
> > > > <caller xsi:type="xsd:string" 
> > > > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > >
> > > > Sidd</caller>
> > > > <strSource xsi:type="xsd:string" 
> > > >
> > > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">&
> > > lt
> > > ;?
> > > > xml
> > > >
> > > version=&quot;1.0&quot;?&gt;&lt;note&gt;&lt;to&gt;Marie&lt;/to&gt;&l
> > > t;
> > > fr
> > > >
> > > om&gt;Kelman&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;
> > > bo
> > > dy
> > > > &gt;Don&apos;t forget to buy another 300
> > > > IBM!&lt;/body&gt;&lt;/note&gt;</strSource>
> > > > </ns1:doTranslate>
> > > > </SOAP-ENV:Body></SOAP-ENV:Envelope>
> > > >  
> > > > Response :
> > > > HTTP/1.0 200 OK Content-Type: text/xml;charset=utf-8
> > > > Accept-Encoding:
> > > > gzip Content-Length: 570
> > > > Set-Cookie: JSESSIONID=ihs916jom1;Path=/translate_2 Date: Thu, 24
> > Apr
> > > > 2003 18:58:22 GMT
> > > > Server: Tomcat Web Server/3.3.1 Final ( JSP 1.1; Servlet 2.2 ) 
> > > > <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > > > <SOAP-ENV:Body>
> > > > <ns1:doTranslateResponse xmlns:ns1="urn:tran"
> > > >
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > > > <return xsi:type="xsd:string">?xml
> > > >
> > > version=1.0?notetoMarie/tofromKelman/fromheadingReminder/headingbody
> > > Do
> > > nt
> > > > forget to buy another 300 IBM!/body/note</return>
> > > > </ns1:doTranslateResponse> </SOAP-ENV:Body>
> > > > </SOAP-ENV:Envelope>
> > > >  
> > > >  
> > > > 
> > > > 
> > > 
> > > 
> > > Scott Nichol
> > > 
> > > Do not reply directly to this e-mail address,
> > > as it is filtered to only receive e-mail from
> > > specific mailing lists.
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > Scott Nichol
> > 
> > Do not reply directly to this e-mail address,
> > as it is filtered to only receive e-mail from
> > specific mailing lists.
> > 
> > 
> > 
> 
> 
> Scott Nichol
> 
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
> 
> 
> 
> 


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.