ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Fell <s...@zaks.demon.co.uk>
Subject Re: [pocketsoap] Apache - Attachment tag refers to label which cound not be found?
Date Fri, 18 Jan 2002 04:01:49 GMT
ok, I'm seeing the same issue. it looks to be a bug in the Apache
Vector deserializer class, if you compare what the vector deserializer
does with what the array deserializer does, then there doesn't appear
to be any code in the vector deserializer to handle hrefs

I'll keep tinkering.

Cheers
Simon

On Thu, 17 Jan 2002 16:39:14 -0500, in soap you wrote:

>Simon,
>
>I tried the hard coded request with id/href values prefixed with a letter
>but I got the same result.
>
>Here is the latest code and message exchange. (I just added the type
>namespace)
>
>
>    Dim e As CoEnvelope
>    Dim t As HTTPTransport
>    Dim vector, brandMasterValue
>
>    Dim brandMasters
>
>    Set e = CreateObject("pocketSOAP.Envelope.2")
>    e.SetMethod "putBrandMasterValues", "urn:BrandMasterService"
>
>    Set vector = e.Parameters.Create("Vector", Empty, , "Vector",
>"urn:BrandMasterService")
>    Set brandMasterValue = vector.Nodes.Create("BrandMasterValue", Empty, ,
>"BrandMasterValue", "urn:BrandMasterService")
>    brandMasterValue.Nodes.Create "brand", 1
>    brandMasterValue.Nodes.Create "brandDescShort", "SHORT1"
>    brandMasterValue.Nodes.Create "brandDescLong", "LONG1"
>    Set brandMasterValue = vector.Nodes.Create("BrandMasterValue", Empty, ,
>"BrandMasterValue", "urn:BrandMasterService")
>    brandMasterValue.Nodes.Create "brand", 2
>    brandMasterValue.Nodes.Create "brandDescShort", "SHORT2"
>    brandMasterValue.Nodes.Create "brandDescLong", "LONG2"
>
>    Set t = CreateObject("pocketSOAP.HTTPTransport.2")
>
>    ' set up proxies / authentication etc here
>    t.Send SOAP_SERVER_URL, e.serialize
>
>    e.Parse t
>
>
>Here is the PocketSOAP request.
>
>POST /soap/servlet/rpcrouter HTTP/1.0
>Content-Type: text/xml; charset=UTF-8
>Accept-Charset: UTF-8, UTF-16
>User-Agent: pocketSOAP/1.2.1
>Host: 10.2.32.46:8080
>Content-Length: 1049
>SOAPAction:
>
><S:Envelope
>	S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
>	xmlns:E='http://schemas.xmlsoap.org/soap/encoding/'
>	xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'
>	xmlns:c='http://www.w3.org/2001/XMLSchema'
>	xmlns:b='http://www.w3.org/2001/XMLSchema-instance'
>	xmlns:a='urn:BrandMasterService'>
><S:Body><a:putBrandMasterValues><Vector href='#23333c'/>
></a:putBrandMasterValues>
><a:BrandMasterValue E:root='0' id='233dd4'
>b:type='a:BrandMasterValue'><brand b:type='c:short'>2</brand>
><brandDescShort b:type='c:string'>SHORT2</brandDescShort>
><brandDescLong b:type='c:string'>LONG2</brandDescLong>
></a:BrandMasterValue>
><a:BrandMasterValue E:root='0' id='23365c'
>b:type='a:BrandMasterValue'><brand b:type='c:short'>1</brand>
><brandDescShort b:type='c:string'>SHORT1</brandDescShort>
><brandDescLong b:type='c:string'>LONG1</brandDescLong>
></a:BrandMasterValue>
><a:Vector E:root='0' id='23333c' b:type='a:Vector'><BrandMasterValue
>href='#23365c'/>
><BrandMasterValue href='#233dd4'/>
></a:Vector>
></S:Body></S:Envelope>
>
>
>Here is Apache's response.
>
>
>HTTP/1.1 500 Internal Server Error
>Date: Thu, 17 Jan 2002 21:19:06 GMT
>Server: Oracle9iAS (1.0.2.2) Containers for J2EE
>Content-Length: 542
>Set-Cookie: JSESSIONID=NJJPLKNFELII; Path=/
>Cache-Control: private
>Connection: Close
>Content-Type: text/xml; charset=utf-8
>
><?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/1999/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><SOAP-ENV:Fault>
><faultcode>SOAP-ENV:Client</faultcode>
><faultstring>Attachment tag "BrandMasterValue" refers to a Mime attachment
>with label "#23365c" which could not be found.</faultstring>
><faultactor>/soap/servlet/rpcrouter</faultactor>
></SOAP-ENV:Fault>
>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>
>
>Here is the Java code.
>
>
>public class BrandMasterService
>{
>  public String putBrandMasterValues(Vector vector) {
>     BrandMasterValue brandMasterValue1 = (BrandMasterValue) vector.get(0);
>     BrandMasterValue brandMasterValue2 = (BrandMasterValue) vector.get(1);
>     return new String("FIRST BRAND MASTER IS = " +
>brandMasterValue1.getBrand() + " THE SECOND IS " +
>brandMasterValue2.getBrand());
>  }
>}
>
>public class BrandMasterValue {
>    private Integer _brand = null;
>    private String _brandDescShort = null;
>    private String _brandDescLong = null;
>
>    public Integer getBrand() {
>        return _brand;
>    }
>
>    public void setBrand(Integer brand ) {
>        _brand = brand;
>    }
>
>    public String getBrandDescShort() {
>        return _brandDescShort;
>    }
>
>    public void setBrandDescShort(String brandDescShort ) {
>        _brandDescShort = brandDescShort;
>    }
>
>    public String getBrandDescLong() {
>        return _brandDescLong;
>    }
>
>    public void setBrandDescLong(String brandDescLong ) {
>        _brandDescLong = brandDescLong;
>    }
>}
>
>
>Thanks,
>
>John
>
>
>
>-----Original Message-----
>From: Simon Fell [mailto:simon@provada.com]
>Sent: Thursday, January 17, 2002 12:23 PM
>To: pocketsoap@yahoogroups.com
>Subject: RE: [pocketsoap] Apache - Attachment tag refers to label which
>cound not be found?
>
>
>Hmmm, its obviously in the request, I can't see why Apache is not finding
>it, or why it thinks its a MIME attachment.
>
>pocketSOAP serializes using href's as it allows it to do a single pass
>serialization, otherwise you have to make 2 passes, one to work out what are
>real multi-ref's, then a second to do the actual serialization, this is
>allowed for in the section 5 encoding spec.
>
>I have a couple of suggestions, Apache may be treating id/href as ID/IDREF
>[which is not what they're defined as], and the id='233124' isn't valid for
>an ID type, which might be what's tripping it up. Can you try sending a hard
>coded request, where all the id/href values are prefixed with a letter ?
>
>I'll got Apache running at home, I'll give it go later on.
>
>You should also raise this on the soap-dev/soap-user Apache list.
>
>Cheers
>Simon
>
>> -----Original Message-----
>> From: John J. Thomas [mailto:jthomas@segue.biz]
>> Sent: Thursday, January 17, 2002 7:32 AM
>> To: pocketsoap@yahoogroups.com
>> Subject: [pocketsoap] Apache - Attachment tag refers to label which
>> cound not be found?
>>
>>
>> Hi Simon,
>>
>> We are using PocketSOAP 1.2.1 and ApacheSOAP and we are
>> trying to use the
>> "nodes" approach to send a Vector of value objects to Apache.
>> We get the
>> following error.
>>
>> "Attachment tag "BrandMasterValue" refers to a Mime
>> attachment with label
>> "#23338c" which could not be found."
>>
>>
>> Here is the pocketSOAP Packet:
>>
>> POST /soap/servlet/rpcrouter HTTP/1.0
>> Content-Type: text/xml; charset=UTF-8
>> Accept-Charset: UTF-8, UTF-16
>> User-Agent: pocketSOAP/1.2.1
>> Host: 10.2.32.46:8080
>> Content-Length: 963
>> SOAPAction: ""
>>
>> <S:Envelope
>> 	S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
>> 	xmlns:E='http://schemas.xmlsoap.org/soap/encoding/'
>> 	xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'
>> 	xmlns:c='http://www.w3.org/2001/XMLSchema'
>> 	xmlns:b='http://www.w3.org/2001/XMLSchema-instance'
>> 	xmlns:a='urn:BrandMasterService'>
>> <S:Body><a:putBrandMasterValues><Vector href='#233124'/>
>> </a:putBrandMasterValues>
>> <BrandMasterValue E:root='0' id='233a0c'><brand
>> b:type='c:short'>2</brand>
>> <brandDescShort b:type='c:string'>SHORT2</brandDescShort>
>> <brandDescLong b:type='c:string'>LONG2</brandDescLong>
>> </BrandMasterValue>
>> <BrandMasterValue E:root='0' id='23338c'><brand
>> b:type='c:short'>1</brand>
>> <brandDescShort b:type='c:string'>SHORT1</brandDescShort>
>> <brandDescLong b:type='c:string'>LONG1</brandDescLong>
>> </BrandMasterValue>
>> <Vector E:root='0' id='233124'><BrandMasterValue href='#23338c'/>
>> <BrandMasterValue href='#233a0c'/>
>> </Vector>
>> </S:Body></S:Envelope>
>>
>>
>> Here is the response from Apache:
>>
>>
>> HTTP/1.1 500 Internal Server Error
>> Date: Thu, 17 Jan 2002 15:11:18 GMT
>> Server: Oracle9iAS (1.0.2.2) Containers for J2EE
>> Content-Length: 542
>> Set-Cookie: JSESSIONID=IDBEDMJFHIJK; Path=/
>> Cache-Control: private
>> Connection: Close
>> Content-Type: text/xml; charset=utf-8
>>
>> <?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/1999/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>> <SOAP-ENV:Body>
>> <SOAP-ENV:Fault>
>> <faultcode>SOAP-ENV:Client</faultcode>
>> <faultstring>Attachment tag "BrandMasterValue" refers to a
>> Mime attachment
>> with label "#23338c" which could not be found.</faultstring>
>> <faultactor>/soap/servlet/rpcrouter</faultactor>
>> </SOAP-ENV:Fault>
>>
>> </SOAP-ENV:Body>
>> </SOAP-ENV:Envelope>
>>
>>
>> Here is the code snippet:
>>
>>
>>     Dim e As CoEnvelope
>>     Dim t As HTTPTransport
>>     Dim vector, brandMasterValue
>>
>>     Dim brandMasters
>>
>>     Set e = CreateObject("pocketSOAP.Envelope.2")
>>
>>     e.SetMethod "putBrandMasterValues", "urn:BrandMasterService"
>>
>>     Set vector = e.Parameters.Create("Vector", Empty)
>>     Set brandMasterValue =
>> vector.Nodes.Create("BrandMasterValue", Empty)
>>     brandMasterValue.Nodes.Create "brand", 1
>>     brandMasterValue.Nodes.Create "brandDescShort", "SHORT1"
>>     brandMasterValue.Nodes.Create "brandDescLong", "LONG1"
>>     Set brandMasterValue =
>> vector.Nodes.Create("BrandMasterValue", Empty)
>>     brandMasterValue.Nodes.Create "brand", 2
>>     brandMasterValue.Nodes.Create "brandDescShort", "SHORT2"
>>     brandMasterValue.Nodes.Create "brandDescLong", "LONG2"
>>
>>     Set t = CreateObject("pocketSOAP.HTTPTransport.2")
>>
>>     ' set up proxies / authentication etc here
>>     t.Send SOAP_SERVER_URL, e.serialize
>>
>>     e.Parse t
>>
>>
>> Any clues? Why does pocketSOAP want to send everything as hrefs?
>>
>>
>> Regards,
>>
>> John
>>
>>
>> ------------------------ Yahoo! Groups Sponsor
>> ---------------------~-->
>> Sponsored by VeriSign - The Value of Trust
>> Pinpoint the right security solution for your company - FREE
>> Guide from industry leader VeriSign gives you all the facts.
>> http://us.click.yahoo.com/pCuuSA/WdiDAA/yigFAA/CefplB/TM
>> --------------------------------------------------------------
>> -------~->
>>
>> To unsubscribe from this group, send an email to:
>> pocketsoap-unsubscribe@yahoogroups.com
>>
>>
>>
>> Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
>
>
>
>
>To unsubscribe from this group, send an email to:
>pocketsoap-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>------------------------ Yahoo! Groups Sponsor ---------------------~-->
>Tiny Wireless Camera under $80!
>Order Now! FREE VCR Commander!
>Click Here - Only 1 Day Left!
>http://us.click.yahoo.com/WoOlbB/7.PDAA/ySSFAA/CefplB/TM
>---------------------------------------------------------------------~->
>
>To unsubscribe from this group, send an email to:
>pocketsoap-unsubscribe@yahoogroups.com
>
> 
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
>


Mime
View raw message