You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Etches, Adam (GE Infra, Energy)" <ad...@ge.com> on 2008/02/12 15:48:21 UTC
retrieving MTOM in a client
I'm using MTOM in a java client but when I try to retrieve the OMText at
the client side i.e.:
OMText binaryNode = (OMText) mapImage.getFirstOMChild();
I get a class cast exception, since the response is returning an
OMElement and not OMText anyone come across this before?
I've checked the soap message and it does actually include the binary
data.
Thanks in advance
Adam
Re: retrieving MTOM in a client
Posted by Thilina Gunarathne <cs...@gmail.com>.
It is the web service engine which host your web service. No idea
about how to do it in Jboss..
But it definitely looks like a huge bug to me, as the server sends out
a MIME/Multipart message, without putting the Mime/multipart content
type and the boundary in the http headers. It's virtually impossible
to process such a message correctly by any client..
~Thilina
On Feb 19, 2008 7:37 AM, Etches, Adam (GE Infra, Energy)
<ad...@ge.com> wrote:
> Thanks, Any ideas where this is configured or set up?
>
> Adam
>
> -----Original Message-----
> From: Thilina Gunarathne [mailto:csethil@gmail.com]
> Sent: 19 February 2008 12:29
> To: axis-user@ws.apache.org
> Subject: Re: retrieving MTOM in a client
>
> Hi,
>
> As I expected, the content-type http header is incorrect.. See here[1] for an example from the spec..
>
> > Content-Type: application/xml;charset=UTF-8
> This should be as follows,
>
> Content-Type: Multipart/Related;
> boundary=MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830;type="application/xop+xml";start="...";....
>
> What surprises me is the fact that, Axis2 extracted the SOAP message without knowing the Mime Boundary :).
>
> thanks,
> Thilina
>
> [1] http://www.w3.org/TR/2004/PR-xop10-20041116/#xop_package_svg_sample
>
> > Transfer-Encoding: chunked
> > Date: Mon, 18 Feb 2008 11:37:15 GMT
> >
> > 494
> > --MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
> > Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
> > Content-Transfer-Encoding: binary
> > Content-ID: <0....@apache.org>
> >
> > <ns:mapResponse
> > xmlns:ns="http://samples.webservice.gss/xsd"><ns:return><ns:map><ns:ma
> > p_return_type><ns:display_style_name>Auto</ns:display_style_name
> > ><ns:crs>uk_british_national_grid_mm</ns:crs><ns:centre>283355000.0000
> > >00,542605000.000000</ns:centre><ns:image_layers>{sw_map=com.gesmallwo
> > >rld.gss.ser
> > vices.map.MapLayerResponse@721098}</ns:image_layers><ns:units>mm</ns:u
> > nits><ns:style_group>default</ns:style_group><ns:options>{}</ns:option
> > s><ns:view
> > _scale>9846153.846153846</ns:view_scale><ns:rotation>0.0</ns:rotation>
> > <ns:map_element_key>swrefVdisplay_styleVidZ0Q1</ns:map_element_key><ns
> > :world>swr
> > efVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world><ns:ace_name>default</ns:ace_name><ns:name>sw_default</ns:name><ns:map_image><xop:Include href="cid:
> > 1.urn:uuid:4DDAF973E789AF02831203334635829@apache.org"
> > xmlns:xop="http://www.w3.org/2004/08/xop/include"
> > /></ns:map_image></ns:map_return_type></ns:ma
> > p></ns:return></ns:mapResponse>
> > 38
> >
> > --MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
> > 59d
> >
> > Content-Type: image/jpeg
> > Content-Transfer-Encoding: binary
> > Content-ID: <1....@apache.org>
> >
> > ►JFIF☺☺☺☺C
> > ♠
> >
> >
> >
> >
> > ↔§▬#▼%$"▼"!&+7/&)4)!"0A149;>>>%.DIC<H7=>;C☺
> >
> >
> > .........<REMOVED REST OF BINARY FILE>...................
> >
> >
> >
> >
> > -----Original Message-----
> > From: Thilina Gunarathne [mailto:csethil@gmail.com]
> >
> > Sent: 19 February 2008 02:54
> > To: axis-user@ws.apache.org
> > Subject: Re: retrieving MTOM in a client
> >
> > Hi,
> > the content type should be as follows..
> > Content-Type: Multipart/Related;boundary=your_MIME_boundary;
> > type="application/xop+xml";start="...
> >
> > Looks like Axis2 does not recognize your message as a MTOM message..It should print the binary payload in base64 encoding if it does, not the <xop:Include> element..
> >
> > What is your server.. Can you post the full HTTP Headers...
> >
> > thanks,
> > Thilina
> >
> >
> > On Feb 18, 2008 10:50 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> > >
> > >
> > >
> > >
> > > Hi,
> > >
> > > The http headers have the content-type set to "application/xop+xml", this seems incorrect should it be multipart? Below is the system print of the mapImage element:
> > >
> > > <ns:map_image
> > > xmlns:ns="http://samples.webservice.gss/xsd"><xop:Include
> > > xmlns:xop="http://www.w3.org/2004/08/xop/include"
> > > href="cid:1.urn:uuid:7CDED494BB20F1F5211203349441213@apache.org"
> > > /></ns:map_image>
> > >
> > > thanks for the help.
> > >
> > > Adam
> > >
> > > ________________________________
> > From: Thilina Gunarathne [mailto:csethil@gmail.com]
> > > Sent: 16 February 2008 13:49
> > >
> > >
> > >
> > > To: axis-user@ws.apache.org
> > > Subject: Re: retrieving MTOM in a client
> > >
> > >
> > >
> > >
> > >
> > > Hi,
> > > The SOAP Message looks fine...
> > >
> > > Can you also look at the HTTPHeaders.. Specially the content-type header and see whether it has "multipart/related" and type="application/xop+xml".... I doubt whether something is wrong in the content type and Axis2 cannot recognize it as a MTOM message..
> > >
> > > Also try printing the content of the mapImage element using mapImage.toString()...
> > >
> > > thanks,
> > > Thilina
> > >
> > >
> > > On Feb 13, 2008 11:31 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> > >
> > > > Thanks Thilina, the SOAP message is below: I'm sure the client
> > > > worked once but then stopped? The client code extract is:
> > > >
> > > >
> > > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > > >
> > > > DataHandler actualDH = (DataHandler)
> > > > binaryNode.getDataHandler();
> > > >
> > > > <soapenv:Envelope
> > > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> > > > <soapenv:Body>
> > > > <ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd">
> > > > <ns:return>
> > > > <ns:map>
> > > > <ns:map_return_type>
> > > > <ns:display_style_name>Region</ns:display_style_name>
> > > > <ns:crs>uk_british_national_grid_mm</ns:crs>
> > > >
> > > > <ns:centre>546307392.000000,258873636.000000</ns:centre>
> > > >
> > > > <ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLaye
> > > > rR
> > > > espo
> > > > nse@1b17b4c}</ns:image_layers>
> > > > <ns:units>mm</ns:units>
> > > > <ns:style_group>default</ns:style_group>
> > > > <ns:options>{}</ns:options>
> > > > <ns:view_scale>127020.02565384615</ns:view_scale>
> > > > <ns:rotation>0.0</ns:rotation>
> > > >
> > > > <ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key
> > > > >
> > > >
> > > > <ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
> > > > <ns:ace_name>default</ns:ace_name>
> > > > <ns:name>test</ns:name>
> > > > <ns:map_image>
> > > > <xop:Include
> > > > href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
> > > > xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> > > > </ns:map_image>
> > > > </ns:map_return_type>
> > > > </ns:map>
> > > > </ns:return>
> > > > </ns:mapResponse>
> > > > </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: csethil@gmail.com [mailto:csethil@gmail.com]
> > > > Sent: 13 February 2008 14:48
> > > > To: axis-user@ws.apache.org
> > > > Subject: Re: retrieving MTOM in a client
> > > >
> > > > Hi Adam,
> > > > It would be helpfull if you post the SOAP message...
> > > >
> > > > Thilina
> > > >
> > > > On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> > > > >
> > > > >
> > > > > I'm using MTOM in a java client but when I try to retrieve the
> > > > > OMText at the client side i.e.:
> > > > >
> > > > >
> > > > >
> > > > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > > > >
> > > > >
> > > > >
> > > > > I get a class cast exception, since the response is returning an
> > > > > OMElement and not OMText anyone come across this before?
> > > > >
> > > > >
> > > > >
> > > > > I've checked the soap message and it does actually include the
> > > > > binary data.
> > > > >
> > > > >
> > > > >
> > > > > Thanks in advance
> > > > >
> > > > > Adam
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Thilina Gunarathne - http://thilinag.blogspot.com
> > > >
> > > > ------------------------------------------------------------------
> > > > --
> > > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > > >
> > > > ------------------------------------------------------------------
> > > > --
> > > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Thilina Gunarathne - http://thilinag.blogspot.com
> >
> >
> >
> > --
> > Thilina Gunarathne - http://thilinag.blogspot.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
--
Thilina Gunarathne - http://thilinag.blogspot.com
RE: retrieving MTOM in a client
Posted by "Etches, Adam (GE Infra, Energy)" <ad...@ge.com>.
Thanks, Any ideas where this is configured or set up?
Adam
-----Original Message-----
From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: 19 February 2008 12:29
To: axis-user@ws.apache.org
Subject: Re: retrieving MTOM in a client
Hi,
As I expected, the content-type http header is incorrect.. See here[1] for an example from the spec..
> Content-Type: application/xml;charset=UTF-8
This should be as follows,
Content-Type: Multipart/Related;
boundary=MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830;type="application/xop+xml";start="...";....
What surprises me is the fact that, Axis2 extracted the SOAP message without knowing the Mime Boundary :).
thanks,
Thilina
[1] http://www.w3.org/TR/2004/PR-xop10-20041116/#xop_package_svg_sample
> Transfer-Encoding: chunked
> Date: Mon, 18 Feb 2008 11:37:15 GMT
>
> 494
> --MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
> Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
> Content-Transfer-Encoding: binary
> Content-ID: <0....@apache.org>
>
> <ns:mapResponse
> xmlns:ns="http://samples.webservice.gss/xsd"><ns:return><ns:map><ns:ma
> p_return_type><ns:display_style_name>Auto</ns:display_style_name
> ><ns:crs>uk_british_national_grid_mm</ns:crs><ns:centre>283355000.0000
> >00,542605000.000000</ns:centre><ns:image_layers>{sw_map=com.gesmallwo
> >rld.gss.ser
> vices.map.MapLayerResponse@721098}</ns:image_layers><ns:units>mm</ns:u
> nits><ns:style_group>default</ns:style_group><ns:options>{}</ns:option
> s><ns:view
> _scale>9846153.846153846</ns:view_scale><ns:rotation>0.0</ns:rotation>
> <ns:map_element_key>swrefVdisplay_styleVidZ0Q1</ns:map_element_key><ns
> :world>swr
> efVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world><ns:ace_name>default</ns:ace_name><ns:name>sw_default</ns:name><ns:map_image><xop:Include href="cid:
> 1.urn:uuid:4DDAF973E789AF02831203334635829@apache.org"
> xmlns:xop="http://www.w3.org/2004/08/xop/include"
> /></ns:map_image></ns:map_return_type></ns:ma
> p></ns:return></ns:mapResponse>
> 38
>
> --MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
> 59d
>
> Content-Type: image/jpeg
> Content-Transfer-Encoding: binary
> Content-ID: <1....@apache.org>
>
> ►JFIF☺☺☺☺C
> ♠
>
>
>
>
> ↔§▬#▼%$"▼"!&+7/&)4)!"0A149;>>>%.DIC<H7=>;C☺
>
>
> .........<REMOVED REST OF BINARY FILE>...................
>
>
>
>
> -----Original Message-----
> From: Thilina Gunarathne [mailto:csethil@gmail.com]
>
> Sent: 19 February 2008 02:54
> To: axis-user@ws.apache.org
> Subject: Re: retrieving MTOM in a client
>
> Hi,
> the content type should be as follows..
> Content-Type: Multipart/Related;boundary=your_MIME_boundary;
> type="application/xop+xml";start="...
>
> Looks like Axis2 does not recognize your message as a MTOM message..It should print the binary payload in base64 encoding if it does, not the <xop:Include> element..
>
> What is your server.. Can you post the full HTTP Headers...
>
> thanks,
> Thilina
>
>
> On Feb 18, 2008 10:50 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> >
> >
> >
> >
> > Hi,
> >
> > The http headers have the content-type set to "application/xop+xml", this seems incorrect should it be multipart? Below is the system print of the mapImage element:
> >
> > <ns:map_image
> > xmlns:ns="http://samples.webservice.gss/xsd"><xop:Include
> > xmlns:xop="http://www.w3.org/2004/08/xop/include"
> > href="cid:1.urn:uuid:7CDED494BB20F1F5211203349441213@apache.org"
> > /></ns:map_image>
> >
> > thanks for the help.
> >
> > Adam
> >
> > ________________________________
> From: Thilina Gunarathne [mailto:csethil@gmail.com]
> > Sent: 16 February 2008 13:49
> >
> >
> >
> > To: axis-user@ws.apache.org
> > Subject: Re: retrieving MTOM in a client
> >
> >
> >
> >
> >
> > Hi,
> > The SOAP Message looks fine...
> >
> > Can you also look at the HTTPHeaders.. Specially the content-type header and see whether it has "multipart/related" and type="application/xop+xml".... I doubt whether something is wrong in the content type and Axis2 cannot recognize it as a MTOM message..
> >
> > Also try printing the content of the mapImage element using mapImage.toString()...
> >
> > thanks,
> > Thilina
> >
> >
> > On Feb 13, 2008 11:31 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> >
> > > Thanks Thilina, the SOAP message is below: I'm sure the client
> > > worked once but then stopped? The client code extract is:
> > >
> > >
> > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > >
> > > DataHandler actualDH = (DataHandler)
> > > binaryNode.getDataHandler();
> > >
> > > <soapenv:Envelope
> > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> > > <soapenv:Body>
> > > <ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd">
> > > <ns:return>
> > > <ns:map>
> > > <ns:map_return_type>
> > > <ns:display_style_name>Region</ns:display_style_name>
> > > <ns:crs>uk_british_national_grid_mm</ns:crs>
> > >
> > > <ns:centre>546307392.000000,258873636.000000</ns:centre>
> > >
> > > <ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLaye
> > > rR
> > > espo
> > > nse@1b17b4c}</ns:image_layers>
> > > <ns:units>mm</ns:units>
> > > <ns:style_group>default</ns:style_group>
> > > <ns:options>{}</ns:options>
> > > <ns:view_scale>127020.02565384615</ns:view_scale>
> > > <ns:rotation>0.0</ns:rotation>
> > >
> > > <ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key
> > > >
> > >
> > > <ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
> > > <ns:ace_name>default</ns:ace_name>
> > > <ns:name>test</ns:name>
> > > <ns:map_image>
> > > <xop:Include
> > > href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
> > > xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> > > </ns:map_image>
> > > </ns:map_return_type>
> > > </ns:map>
> > > </ns:return>
> > > </ns:mapResponse>
> > > </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: csethil@gmail.com [mailto:csethil@gmail.com]
> > > Sent: 13 February 2008 14:48
> > > To: axis-user@ws.apache.org
> > > Subject: Re: retrieving MTOM in a client
> > >
> > > Hi Adam,
> > > It would be helpfull if you post the SOAP message...
> > >
> > > Thilina
> > >
> > > On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> > > >
> > > >
> > > > I'm using MTOM in a java client but when I try to retrieve the
> > > > OMText at the client side i.e.:
> > > >
> > > >
> > > >
> > > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > > >
> > > >
> > > >
> > > > I get a class cast exception, since the response is returning an
> > > > OMElement and not OMText anyone come across this before?
> > > >
> > > >
> > > >
> > > > I've checked the soap message and it does actually include the
> > > > binary data.
> > > >
> > > >
> > > >
> > > > Thanks in advance
> > > >
> > > > Adam
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Thilina Gunarathne - http://thilinag.blogspot.com
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
Thilina Gunarathne - http://thilinag.blogspot.com
Re: retrieving MTOM in a client
Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
As I expected, the content-type http header is incorrect.. See here[1]
for an example from the spec..
> Content-Type: application/xml;charset=UTF-8
This should be as follows,
Content-Type: Multipart/Related;
boundary=MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830;type="application/xop+xml";start="...";....
What surprises me is the fact that, Axis2 extracted the SOAP message
without knowing the Mime Boundary :).
thanks,
Thilina
[1] http://www.w3.org/TR/2004/PR-xop10-20041116/#xop_package_svg_sample
> Transfer-Encoding: chunked
> Date: Mon, 18 Feb 2008 11:37:15 GMT
>
> 494
> --MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
> Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
> Content-Transfer-Encoding: binary
> Content-ID: <0....@apache.org>
>
> <ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd"><ns:return><ns:map><ns:map_return_type><ns:display_style_name>Auto</ns:display_style_name
> ><ns:crs>uk_british_national_grid_mm</ns:crs><ns:centre>283355000.000000,542605000.000000</ns:centre><ns:image_layers>{sw_map=com.gesmallworld.gss.ser
> vices.map.MapLayerResponse@721098}</ns:image_layers><ns:units>mm</ns:units><ns:style_group>default</ns:style_group><ns:options>{}</ns:options><ns:view
> _scale>9846153.846153846</ns:view_scale><ns:rotation>0.0</ns:rotation><ns:map_element_key>swrefVdisplay_styleVidZ0Q1</ns:map_element_key><ns:world>swr
> efVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world><ns:ace_name>default</ns:ace_name><ns:name>sw_default</ns:name><ns:map_image><xop:Include href="cid:
> 1.urn:uuid:4DDAF973E789AF02831203334635829@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include" /></ns:map_image></ns:map_return_type></ns:ma
> p></ns:return></ns:mapResponse>
> 38
>
> --MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
> 59d
>
> Content-Type: image/jpeg
> Content-Transfer-Encoding: binary
> Content-ID: <1....@apache.org>
>
> ►JFIF☺☺☺☺C
> ♠
>
>
>
>
> ↔§▬#▼%$"▼"!&+7/&)4)!"0A149;>>>%.DIC<H7=>;C☺
>
>
> .........<REMOVED REST OF BINARY FILE>...................
>
>
>
>
> -----Original Message-----
> From: Thilina Gunarathne [mailto:csethil@gmail.com]
>
> Sent: 19 February 2008 02:54
> To: axis-user@ws.apache.org
> Subject: Re: retrieving MTOM in a client
>
> Hi,
> the content type should be as follows..
> Content-Type: Multipart/Related;boundary=your_MIME_boundary;
> type="application/xop+xml";start="...
>
> Looks like Axis2 does not recognize your message as a MTOM message..It should print the binary payload in base64 encoding if it does, not the <xop:Include> element..
>
> What is your server.. Can you post the full HTTP Headers...
>
> thanks,
> Thilina
>
>
> On Feb 18, 2008 10:50 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> >
> >
> >
> >
> > Hi,
> >
> > The http headers have the content-type set to "application/xop+xml", this seems incorrect should it be multipart? Below is the system print of the mapImage element:
> >
> > <ns:map_image
> > xmlns:ns="http://samples.webservice.gss/xsd"><xop:Include
> > xmlns:xop="http://www.w3.org/2004/08/xop/include"
> > href="cid:1.urn:uuid:7CDED494BB20F1F5211203349441213@apache.org"
> > /></ns:map_image>
> >
> > thanks for the help.
> >
> > Adam
> >
> > ________________________________
> From: Thilina Gunarathne [mailto:csethil@gmail.com]
> > Sent: 16 February 2008 13:49
> >
> >
> >
> > To: axis-user@ws.apache.org
> > Subject: Re: retrieving MTOM in a client
> >
> >
> >
> >
> >
> > Hi,
> > The SOAP Message looks fine...
> >
> > Can you also look at the HTTPHeaders.. Specially the content-type header and see whether it has "multipart/related" and type="application/xop+xml".... I doubt whether something is wrong in the content type and Axis2 cannot recognize it as a MTOM message..
> >
> > Also try printing the content of the mapImage element using mapImage.toString()...
> >
> > thanks,
> > Thilina
> >
> >
> > On Feb 13, 2008 11:31 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> >
> > > Thanks Thilina, the SOAP message is below: I'm sure the client
> > > worked once but then stopped? The client code extract is:
> > >
> > >
> > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > >
> > > DataHandler actualDH = (DataHandler)
> > > binaryNode.getDataHandler();
> > >
> > > <soapenv:Envelope
> > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> > > <soapenv:Body>
> > > <ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd">
> > > <ns:return>
> > > <ns:map>
> > > <ns:map_return_type>
> > > <ns:display_style_name>Region</ns:display_style_name>
> > > <ns:crs>uk_british_national_grid_mm</ns:crs>
> > >
> > > <ns:centre>546307392.000000,258873636.000000</ns:centre>
> > >
> > > <ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLayerR
> > > espo
> > > nse@1b17b4c}</ns:image_layers>
> > > <ns:units>mm</ns:units>
> > > <ns:style_group>default</ns:style_group>
> > > <ns:options>{}</ns:options>
> > > <ns:view_scale>127020.02565384615</ns:view_scale>
> > > <ns:rotation>0.0</ns:rotation>
> > >
> > > <ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key>
> > >
> > > <ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
> > > <ns:ace_name>default</ns:ace_name>
> > > <ns:name>test</ns:name>
> > > <ns:map_image>
> > > <xop:Include
> > > href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
> > > xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> > > </ns:map_image>
> > > </ns:map_return_type>
> > > </ns:map>
> > > </ns:return>
> > > </ns:mapResponse>
> > > </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: csethil@gmail.com [mailto:csethil@gmail.com]
> > > Sent: 13 February 2008 14:48
> > > To: axis-user@ws.apache.org
> > > Subject: Re: retrieving MTOM in a client
> > >
> > > Hi Adam,
> > > It would be helpfull if you post the SOAP message...
> > >
> > > Thilina
> > >
> > > On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> > > >
> > > >
> > > > I'm using MTOM in a java client but when I try to retrieve the
> > > > OMText at the client side i.e.:
> > > >
> > > >
> > > >
> > > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > > >
> > > >
> > > >
> > > > I get a class cast exception, since the response is returning an
> > > > OMElement and not OMText anyone come across this before?
> > > >
> > > >
> > > >
> > > > I've checked the soap message and it does actually include the
> > > > binary data.
> > > >
> > > >
> > > >
> > > > Thanks in advance
> > > >
> > > > Adam
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Thilina Gunarathne - http://thilinag.blogspot.com
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
Thilina Gunarathne - http://thilinag.blogspot.com
RE: retrieving MTOM in a client
Posted by "Etches, Adam (GE Infra, Energy)" <ad...@ge.com>.
Hi,
The server I'm running on is JBOSS 4.0.3SP1. Here is the complete HTTP response.
Adam
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5
Content-Type: application/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 18 Feb 2008 11:37:15 GMT
494
--MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0....@apache.org>
<ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd"><ns:return><ns:map><ns:map_return_type><ns:display_style_name>Auto</ns:display_style_name
><ns:crs>uk_british_national_grid_mm</ns:crs><ns:centre>283355000.000000,542605000.000000</ns:centre><ns:image_layers>{sw_map=com.gesmallworld.gss.ser
vices.map.MapLayerResponse@721098}</ns:image_layers><ns:units>mm</ns:units><ns:style_group>default</ns:style_group><ns:options>{}</ns:options><ns:view
_scale>9846153.846153846</ns:view_scale><ns:rotation>0.0</ns:rotation><ns:map_element_key>swrefVdisplay_styleVidZ0Q1</ns:map_element_key><ns:world>swr
efVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world><ns:ace_name>default</ns:ace_name><ns:name>sw_default</ns:name><ns:map_image><xop:Include href="cid:
1.urn:uuid:4DDAF973E789AF02831203334635829@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include" /></ns:map_image></ns:map_return_type></ns:ma
p></ns:return></ns:mapResponse>
38
--MIMEBoundaryurn_uuid_4DDAF973E789AF02831203334635830
59d
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: <1....@apache.org>
►JFIF☺☺☺☺C
♠
↔§▬#▼%$"▼"!&+7/&)4)!"0A149;>>>%.DIC<H7=>;C☺
.........<REMOVED REST OF BINARY FILE>...................
-----Original Message-----
From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: 19 February 2008 02:54
To: axis-user@ws.apache.org
Subject: Re: retrieving MTOM in a client
Hi,
the content type should be as follows..
Content-Type: Multipart/Related;boundary=your_MIME_boundary;
type="application/xop+xml";start="...
Looks like Axis2 does not recognize your message as a MTOM message..It should print the binary payload in base64 encoding if it does, not the <xop:Include> element..
What is your server.. Can you post the full HTTP Headers...
thanks,
Thilina
On Feb 18, 2008 10:50 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
>
>
>
>
> Hi,
>
> The http headers have the content-type set to "application/xop+xml", this seems incorrect should it be multipart? Below is the system print of the mapImage element:
>
> <ns:map_image
> xmlns:ns="http://samples.webservice.gss/xsd"><xop:Include
> xmlns:xop="http://www.w3.org/2004/08/xop/include"
> href="cid:1.urn:uuid:7CDED494BB20F1F5211203349441213@apache.org"
> /></ns:map_image>
>
> thanks for the help.
>
> Adam
>
> ________________________________
From: Thilina Gunarathne [mailto:csethil@gmail.com]
> Sent: 16 February 2008 13:49
>
>
>
> To: axis-user@ws.apache.org
> Subject: Re: retrieving MTOM in a client
>
>
>
>
>
> Hi,
> The SOAP Message looks fine...
>
> Can you also look at the HTTPHeaders.. Specially the content-type header and see whether it has "multipart/related" and type="application/xop+xml".... I doubt whether something is wrong in the content type and Axis2 cannot recognize it as a MTOM message..
>
> Also try printing the content of the mapImage element using mapImage.toString()...
>
> thanks,
> Thilina
>
>
> On Feb 13, 2008 11:31 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
>
> > Thanks Thilina, the SOAP message is below: I'm sure the client
> > worked once but then stopped? The client code extract is:
> >
> >
> > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> >
> > DataHandler actualDH = (DataHandler)
> > binaryNode.getDataHandler();
> >
> > <soapenv:Envelope
> > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> > <soapenv:Body>
> > <ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd">
> > <ns:return>
> > <ns:map>
> > <ns:map_return_type>
> > <ns:display_style_name>Region</ns:display_style_name>
> > <ns:crs>uk_british_national_grid_mm</ns:crs>
> >
> > <ns:centre>546307392.000000,258873636.000000</ns:centre>
> >
> > <ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLayerR
> > espo
> > nse@1b17b4c}</ns:image_layers>
> > <ns:units>mm</ns:units>
> > <ns:style_group>default</ns:style_group>
> > <ns:options>{}</ns:options>
> > <ns:view_scale>127020.02565384615</ns:view_scale>
> > <ns:rotation>0.0</ns:rotation>
> >
> > <ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key>
> >
> > <ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
> > <ns:ace_name>default</ns:ace_name>
> > <ns:name>test</ns:name>
> > <ns:map_image>
> > <xop:Include
> > href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
> > xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> > </ns:map_image>
> > </ns:map_return_type>
> > </ns:map>
> > </ns:return>
> > </ns:mapResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> >
> >
> >
> > -----Original Message-----
> > From: csethil@gmail.com [mailto:csethil@gmail.com]
> > Sent: 13 February 2008 14:48
> > To: axis-user@ws.apache.org
> > Subject: Re: retrieving MTOM in a client
> >
> > Hi Adam,
> > It would be helpfull if you post the SOAP message...
> >
> > Thilina
> >
> > On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> > >
> > >
> > > I'm using MTOM in a java client but when I try to retrieve the
> > > OMText at the client side i.e.:
> > >
> > >
> > >
> > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > >
> > >
> > >
> > > I get a class cast exception, since the response is returning an
> > > OMElement and not OMText anyone come across this before?
> > >
> > >
> > >
> > > I've checked the soap message and it does actually include the
> > > binary data.
> > >
> > >
> > >
> > > Thanks in advance
> > >
> > > Adam
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Thilina Gunarathne - http://thilinag.blogspot.com
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
--
Thilina Gunarathne - http://thilinag.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: retrieving MTOM in a client
Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
the content type should be as follows..
Content-Type: Multipart/Related;boundary=your_MIME_boundary;
type="application/xop+xml";start="...
Looks like Axis2 does not recognize your message as a MTOM message..It
should print the binary payload in base64 encoding if it does, not the
<xop:Include> element..
What is your server.. Can you post the full HTTP Headers...
thanks,
Thilina
On Feb 18, 2008 10:50 AM, Etches, Adam (GE Infra, Energy)
<ad...@ge.com> wrote:
>
>
>
>
> Hi,
>
> The http headers have the content-type set to "application/xop+xml", this seems incorrect should it be multipart? Below is the system print of the mapImage element:
>
> <ns:map_image xmlns:ns="http://samples.webservice.gss/xsd"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1.urn:uuid:7CDED494BB20F1F5211203349441213@apache.org" /></ns:map_image>
>
> thanks for the help.
>
> Adam
>
> ________________________________
From: Thilina Gunarathne [mailto:csethil@gmail.com]
> Sent: 16 February 2008 13:49
>
>
>
> To: axis-user@ws.apache.org
> Subject: Re: retrieving MTOM in a client
>
>
>
>
>
> Hi,
> The SOAP Message looks fine...
>
> Can you also look at the HTTPHeaders.. Specially the content-type header and see whether it has "multipart/related" and type="application/xop+xml".... I doubt whether something is wrong in the content type and Axis2 cannot recognize it as a MTOM message..
>
> Also try printing the content of the mapImage element using mapImage.toString()...
>
> thanks,
> Thilina
>
>
> On Feb 13, 2008 11:31 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
>
> > Thanks Thilina, the SOAP message is below: I'm sure the client worked
> > once but then stopped? The client code extract is:
> >
> >
> > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> >
> > DataHandler actualDH = (DataHandler)
> > binaryNode.getDataHandler();
> >
> > <soapenv:Envelope
> > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> > <soapenv:Body>
> > <ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd">
> > <ns:return>
> > <ns:map>
> > <ns:map_return_type>
> > <ns:display_style_name>Region</ns:display_style_name>
> > <ns:crs>uk_british_national_grid_mm</ns:crs>
> >
> > <ns:centre>546307392.000000,258873636.000000</ns:centre>
> >
> > <ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLayerRespo
> > nse@1b17b4c}</ns:image_layers>
> > <ns:units>mm</ns:units>
> > <ns:style_group>default</ns:style_group>
> > <ns:options>{}</ns:options>
> > <ns:view_scale>127020.02565384615</ns:view_scale>
> > <ns:rotation>0.0</ns:rotation>
> >
> > <ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key>
> >
> > <ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
> > <ns:ace_name>default</ns:ace_name>
> > <ns:name>test</ns:name>
> > <ns:map_image>
> > <xop:Include
> > href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
> > xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> > </ns:map_image>
> > </ns:map_return_type>
> > </ns:map>
> > </ns:return>
> > </ns:mapResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> >
> >
> >
> > -----Original Message-----
> > From: csethil@gmail.com [mailto:csethil@gmail.com]
> > Sent: 13 February 2008 14:48
> > To: axis-user@ws.apache.org
> > Subject: Re: retrieving MTOM in a client
> >
> > Hi Adam,
> > It would be helpfull if you post the SOAP message...
> >
> > Thilina
> >
> > On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> > >
> > >
> > > I'm using MTOM in a java client but when I try to retrieve the OMText
> > > at the client side i.e.:
> > >
> > >
> > >
> > > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> > >
> > >
> > >
> > > I get a class cast exception, since the response is returning an
> > > OMElement and not OMText anyone come across this before?
> > >
> > >
> > >
> > > I've checked the soap message and it does actually include the binary
> > > data.
> > >
> > >
> > >
> > > Thanks in advance
> > >
> > > Adam
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Thilina Gunarathne - http://thilinag.blogspot.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
--
Thilina Gunarathne - http://thilinag.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: retrieving MTOM in a client
Posted by "Etches, Adam (GE Infra, Energy)" <ad...@ge.com>.
Hi,
The http headers have the content-type set to "application/xop+xml",
this seems incorrect should it be multipart? Below is the system print
of the mapImage element:
<ns:map_image xmlns:ns="http://samples.webservice.gss/xsd"><xop:Include
xmlns:xop="http://www.w3.org/2004/08/xop/include"
href="cid:1.urn:uuid:7CDED494BB20F1F5211203349441213@apache.org"
/></ns:map_image>
thanks for the help.
Adam
_____
From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: 16 February 2008 13:49
To: axis-user@ws.apache.org
Subject: Re: retrieving MTOM in a client
Hi,
The SOAP Message looks fine...
Can you also look at the HTTPHeaders.. Specially the content-type header
and see whether it has "multipart/related" and
type="application/xop+xml".... I doubt whether something is wrong in the
content type and Axis2 cannot recognize it as a MTOM message..
Also try printing the content of the mapImage element using
mapImage.toString()...
thanks,
Thilina
On Feb 13, 2008 11:31 AM, Etches, Adam (GE Infra, Energy)
<ad...@ge.com> wrote:
Thanks Thilina, the SOAP message is below: I'm sure the client
worked
once but then stopped? The client code extract is:
OMText binaryNode = (OMText) mapImage.getFirstOMChild();
DataHandler actualDH = (DataHandler)
binaryNode.getDataHandler();
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:mapResponse
xmlns:ns="http://samples.webservice.gss/xsd">
<ns:return>
<ns:map>
<ns:map_return_type>
<ns:display_style_name>Region</ns:display_style_name>
<ns:crs>uk_british_national_grid_mm</ns:crs>
<ns:centre>546307392.000000,258873636.000000</ns:centre>
<ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLayerRespo
nse@1b17b4c}</ns:image_layers>
<ns:units>mm</ns:units>
<ns:style_group>default</ns:style_group>
<ns:options>{}</ns:options>
<ns:view_scale>127020.02565384615</ns:view_scale>
<ns:rotation>0.0</ns:rotation>
<ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key>
<ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
<ns:ace_name>default</ns:ace_name>
<ns:name>test</ns:name>
<ns:map_image>
<xop:Include
href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</ns:map_image>
</ns:map_return_type>
</ns:map>
</ns:return>
</ns:mapResponse>
</soapenv:Body>
</soapenv:Envelope>
-----Original Message-----
From: csethil@gmail.com [mailto:csethil@gmail.com]
Sent: 13 February 2008 14:48
To: axis-user@ws.apache.org
Subject: Re: retrieving MTOM in a client
Hi Adam,
It would be helpfull if you post the SOAP message...
Thilina
On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com>
wrote:
>
>
> I'm using MTOM in a java client but when I try to retrieve the
OMText
> at the client side i.e.:
>
>
>
> OMText binaryNode = (OMText) mapImage.getFirstOMChild();
>
>
>
> I get a class cast exception, since the response is returning
an
> OMElement and not OMText anyone come across this before?
>
>
>
> I've checked the soap message and it does actually include the
binary
> data.
>
>
>
> Thanks in advance
>
> Adam
>
>
>
>
--
Thilina Gunarathne - http://thilinag.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
--
Thilina Gunarathne - http://thilinag.blogspot.com
Re: retrieving MTOM in a client
Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
The SOAP Message looks fine...
Can you also look at the HTTPHeaders.. Specially the content-type header and
see whether it has "multipart/related" and type="application/xop+xml".... I
doubt whether something is wrong in the content type and Axis2 cannot
recognize it as a MTOM message..
Also try printing the content of the mapImage element using
mapImage.toString()...
thanks,
Thilina
On Feb 13, 2008 11:31 AM, Etches, Adam (GE Infra, Energy) <
adam.etches@ge.com> wrote:
> Thanks Thilina, the SOAP message is below: I'm sure the client worked
> once but then stopped? The client code extract is:
>
> OMText binaryNode = (OMText) mapImage.getFirstOMChild();
>
> DataHandler actualDH = (DataHandler)
> binaryNode.getDataHandler();
>
> <soapenv:Envelope
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
> <soapenv:Body>
> <ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd">
> <ns:return>
> <ns:map>
> <ns:map_return_type>
> <ns:display_style_name>Region</ns:display_style_name>
> <ns:crs>uk_british_national_grid_mm</ns:crs>
>
> <ns:centre>546307392.000000,258873636.000000</ns:centre>
>
> <ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLayerRespo
> nse@1b17b4c}</ns:image_layers>
> <ns:units>mm</ns:units>
> <ns:style_group>default</ns:style_group>
> <ns:options>{}</ns:options>
> <ns:view_scale>127020.02565384615</ns:view_scale>
> <ns:rotation>0.0</ns:rotation>
>
> <ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key>
>
> <ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
> <ns:ace_name>default</ns:ace_name>
> <ns:name>test</ns:name>
> <ns:map_image>
> <xop:Include
> href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
> xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> </ns:map_image>
> </ns:map_return_type>
> </ns:map>
> </ns:return>
> </ns:mapResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> -----Original Message-----
> From: csethil@gmail.com [mailto:csethil@gmail.com]
> Sent: 13 February 2008 14:48
> To: axis-user@ws.apache.org
> Subject: Re: retrieving MTOM in a client
>
> Hi Adam,
> It would be helpfull if you post the SOAP message...
>
> Thilina
>
> On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
> >
> >
> > I'm using MTOM in a java client but when I try to retrieve the OMText
> > at the client side i.e.:
> >
> >
> >
> > OMText binaryNode = (OMText) mapImage.getFirstOMChild();
> >
> >
> >
> > I get a class cast exception, since the response is returning an
> > OMElement and not OMText anyone come across this before?
> >
> >
> >
> > I've checked the soap message and it does actually include the binary
> > data.
> >
> >
> >
> > Thanks in advance
> >
> > Adam
> >
> >
> >
> >
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Thilina Gunarathne - http://thilinag.blogspot.com
RE: retrieving MTOM in a client
Posted by "Etches, Adam (GE Infra, Energy)" <ad...@ge.com>.
Thanks Thilina, the SOAP message is below: I'm sure the client worked
once but then stopped? The client code extract is:
OMText binaryNode = (OMText) mapImage.getFirstOMChild();
DataHandler actualDH = (DataHandler)
binaryNode.getDataHandler();
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:mapResponse xmlns:ns="http://samples.webservice.gss/xsd">
<ns:return>
<ns:map>
<ns:map_return_type>
<ns:display_style_name>Region</ns:display_style_name>
<ns:crs>uk_british_national_grid_mm</ns:crs>
<ns:centre>546307392.000000,258873636.000000</ns:centre>
<ns:image_layers>{sw_map=com.gesmallworld.gss.services.map.MapLayerRespo
nse@1b17b4c}</ns:image_layers>
<ns:units>mm</ns:units>
<ns:style_group>default</ns:style_group>
<ns:options>{}</ns:options>
<ns:view_scale>127020.02565384615</ns:view_scale>
<ns:rotation>0.0</ns:rotation>
<ns:map_element_key>swrefVdisplay_styleVidZ0Q6</ns:map_element_key>
<ns:world>swrefVworldVdatasetZgisVuniverseZ0VworldZ0</ns:world>
<ns:ace_name>default</ns:ace_name>
<ns:name>test</ns:name>
<ns:map_image>
<xop:Include
href="cid:1.urn:uuid:C6F2B439C5A8ED2F131202919778115@apache.org"
xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
</ns:map_image>
</ns:map_return_type>
</ns:map>
</ns:return>
</ns:mapResponse>
</soapenv:Body>
</soapenv:Envelope>
-----Original Message-----
From: csethil@gmail.com [mailto:csethil@gmail.com]
Sent: 13 February 2008 14:48
To: axis-user@ws.apache.org
Subject: Re: retrieving MTOM in a client
Hi Adam,
It would be helpfull if you post the SOAP message...
Thilina
On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
>
>
> I'm using MTOM in a java client but when I try to retrieve the OMText
> at the client side i.e.:
>
>
>
> OMText binaryNode = (OMText) mapImage.getFirstOMChild();
>
>
>
> I get a class cast exception, since the response is returning an
> OMElement and not OMText anyone come across this before?
>
>
>
> I've checked the soap message and it does actually include the binary
> data.
>
>
>
> Thanks in advance
>
> Adam
>
>
>
>
--
Thilina Gunarathne - http://thilinag.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: retrieving MTOM in a client
Posted by cs...@gmail.com.
Hi Adam,
It would be helpfull if you post the SOAP message...
Thilina
On 2/12/08, Etches, Adam (GE Infra, Energy) <ad...@ge.com> wrote:
>
>
> I'm using MTOM in a java client but when I try to retrieve the OMText at
> the client side i.e.:
>
>
>
> OMText binaryNode = (OMText) mapImage.getFirstOMChild();
>
>
>
> I get a class cast exception, since the response is returning an
> OMElement and not OMText anyone come across this before?
>
>
>
> I've checked the soap message and it does actually include the binary
> data.
>
>
>
> Thanks in advance
>
> Adam
>
>
>
>
--
Thilina Gunarathne - http://thilinag.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org