axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From callagc4 <cathal.callag...@fineos.com>
Subject Re: MTOM defintition in wsdl
Date Wed, 27 Feb 2008 07:30:14 GMT

Hi Thilina,

Thanks for your reply. Just to give you some more details on what binding i
am using etc. I am using jaxbri data-binding. Testing has shown that when
sending a message with binary information (denoted in my wsdl as
xsd:base64Binary) via the http protocol, the message contains the correct
xop headers but the binary data is stored by value inside the soap envolope. 


Also when sending a message via the jms protocol, which is our primary
interest, i found that after i had explicitly set the following on the
msgContext before the JMSSender creates the JMSMessage that the message is
send with the corrrect Mime boundary but the soap message again contains the
binary information by value inside the envolope.

msgContext.setDoingMTOM(true);
options.setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);  
options.setProperty(JMSConstants.JMS_MESSAGE_TYPE,
JMSConstants.JMS_BYTE_MESSAGE);

Can you advise on what may be the cause of this issue, and what potential
workaround could be tried. Have the data binding guys come up with any
possible causes for this given the wsdl and xsd i posted prievously?

Thanks for your help,
Cathal





Thilina Gunarathne wrote:
> 
> Hi,
> 
>>  Is this an issue with the generator? Why does it not add the qname of my
>>  binary element to the opNameArray?
> Sounds like it should work.. I'll let our data binding guys to give
> the an answer... If nothing works out, report a JIRA with your WSDL
> and if possible with a test case..
> 
>>  2) the second approach outlined in the documentation states:
>>  Going a little further, you can use the xmime schema
>>  (http://www.w3.org/2005/05/xmlmime) to describe the binary content more
>>  precisely
> Save the "xmlmime.xsd" file locally in your system and add the
> following to your XSD..
> 
> <xsd:import namespace="http://www.w3.org/2005/05/xmlmime"
>     		schemaLocation="xmlmime.xsd" />
> 
> thanks,
> Thilina
> 
>>  However this requires import the http://www.w3.org/2005/05/xmlmime
>> namespace
>>  which fails inside our firewall with the following exception:
>>
>>  Retrieving schema at 'http://www.w3.org/2005/05/xmlmime', relative to
>> 
>> 'file:/E:/Sandboxes/ProductServices-220208/src/com/fineos/frontoffice/documentproduction/DocumentProductionOperationsXSD/DocumentProductionOperations.xsd'.
>>  Exception in thread "main"
>>  org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
>> WSDL
>>         at
>> 
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:150)
>>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>>  Caused by: javax.wsdl.WSDLException: WSDLException (at
>>  /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema):
>> faultCode=OTHER_ERROR:
>>  An error occurred trying to resolve schema referenced at
>>  'http://www.w3.org/2005/05/xmlmime', relative to
>> 
>> 'file:/E:/Sandboxes/ProductServices-220208/src/com/fineos/frontoffice/documentproduction/DocumentProductionOperationsXSD/DocumentProductionOperations.xsd'.:
>>  java.net.NoRouteToHostException: No route to host: connect
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
>> Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>>         at
>> 
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:286)
>>         at
>> 
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:105)
>>         ... 2 more
>>  Caused by: java.net.NoRouteToHostException: No route to host: connect
>>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>>         at
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>>         at java.net.Socket.connect(Socket.java:519)
>>         at java.net.Socket.connect(Socket.java:469)
>>         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
>>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:382)
>>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
>>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
>>         at sun.net.www.http.HttpClient.New(HttpClient.java:304)
>>         at sun.net.www.http.HttpClient.New(HttpClient.java:316)
>>         at
>> 
>> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817)
>>         at
>> 
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769)
>>         at
>> 
>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)
>>         at
>> 
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
>>         at java.net.URL.openStream(URL.java:1007)
>>         at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
>> Source)
>>         ... 12 more
>>
>>
>>  wsdl def:
>>  <?xml version="1.0" encoding="UTF-8"?>
>>  <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>
>> 
>> xmlns:operationtypes="http://www.fineos.com/frontoffice/documentproduction/operationtypes"
>>     xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>>         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>>         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>         xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
>>         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>
>> 
>> targetNamespace="http://www.fineos.com/frontoffice/documentproduction/operationtypes">
>>     <wsdl:types>
>>                 <xsd:schema
>> 
>> targetNamespace="http://www.fineos.com/frontoffice/documentproduction/operationtypes">
>>                 <xsd:include
>> 
>> schemaLocation="../../documentproduction/DocumentProductionOperationsXSD/DocumentProductionOperations.xsd"/>
>>                 </xsd:schema>
>>     </wsdl:types>
>>     <wsdl:message name="uploadFileRequest">
>>         <wsdl:part name="parameters"
>> element="operationtypes:uploadFile"/>
>>     </wsdl:message>
>>     <wsdl:message name="uploadFileResponse">
>>         <wsdl:part name="parameters"
>>  element="operationtypes:uploadFileResponse"/>
>>     </wsdl:message>
>>     <wsdl:portType name="DocProdServicesPortType">
>>         <wsdl:operation name="uploadFile">
>>             <wsdl:input message="operationtypes:uploadFileRequest"
>>  wsaw:Action="urn:uploadFile"/>
>>             <wsdl:output message="operationtypes:uploadFileResponse"
>>  wsaw:Action="urn:uploadFileResponse"/>
>>         </wsdl:operation>
>>     </wsdl:portType>
>>     <wsdl:binding name="DocProdServicesSOAP11Binding"
>>  type="operationtypes:DocProdServicesPortType">
>>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>>  style="document"/>
>>         <wsdl:operation name="uploadFile">
>>             <soap:operation soapAction="urn:uploadFile"
>> style="document"/>
>>             <wsdl:input>
>>                 <soap:body use="literal"/>
>>             </wsdl:input>
>>             <wsdl:output>
>>                 <soap:body use="literal"/>
>>             </wsdl:output>
>>         </wsdl:operation>
>>     </wsdl:binding>
>>     <wsdl:binding name="DocProdServicesSOAP12Binding"
>>  type="operationtypes:DocProdServicesPortType">
>>         <wsdl:operation name="uploadFile">
>>             <soap12:operation soapAction="urn:uploadFile"
>> style="document"/>
>>             <wsdl:input>
>>                 <soap12:body use="literal"/>
>>             </wsdl:input>
>>             <wsdl:output>
>>                 <soap12:body use="literal"/>
>>             </wsdl:output>
>>         </wsdl:operation>
>>     </wsdl:binding>
>>     <wsdl:binding name="DocProdServicesHttpBinding"
>>  type="operationtypes:DocProdServicesPortType">
>>         <http:binding verb="POST"/>
>>         <wsdl:operation name="uploadFile">
>>             <http:operation location="DocProdServices/uploadFile"/>
>>             <wsdl:input>
>>                 <mime:content type="text/xml" part="uploadFile"/>
>>             </wsdl:input>
>>             <wsdl:output>
>>                 <mime:content type="text/xml" part="uploadFile"/>
>>             </wsdl:output>
>>         </wsdl:operation>
>>     </wsdl:binding>
>>     <wsdl:service name="DocProdServices">
>>         <wsdl:port name="DocProdServicesSOAP11port_http"
>>  binding="operationtypes:DocProdServicesSOAP11Binding">
>>             <soap:address
>>  location="http://localhost:8080/axis2/service/DocProdServices"/>
>>         </wsdl:port>
>>         <wsdl:port name="DocProdServicesSOAP12port_http"
>>  binding="operationtypes:DocProdServicesSOAP12Binding">
>>             <soap12:address
>>  location="http://localhost:8080/axis2/service/DocProdServices"/>
>>         </wsdl:port>
>>         <wsdl:port name="DocProdServicesHttpport"
>>  binding="operationtypes:DocProdServicesHttpBinding">
>>             <http:address
>>  location="http://localhost:8080/axis2/service/DocProdServices"/>
>>         </wsdl:port>
>>     </wsdl:service>
>>  </wsdl:definitions>
>>
>>
>>  xsd def:
>>  <?xml version="1.0" encoding="UTF-8"?>
>>  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>         attributeFormDefault="unqualified"
>> elementFormDefault="unqualified"
>>
>> 
>> targetNamespace="http://www.fineos.com/frontoffice/documentproduction/operationtypes">
>>
>>      <xsd:element name="uploadFile">
>>         <xsd:complexType>
>>             <xsd:sequence>
>>                 <xsd:element minOccurs="0" name="encodedFile"
>>  nillable="true" type="xsd:base64Binary" />
>>                 <xsd:element minOccurs="0" name="parentDirName"
>>  nillable="true" type="xsd:string" />
>>             </xsd:sequence>
>>         </xsd:complexType>
>>     </xsd:element>
>>      <xsd:element name="uploadFileResponse">
>>         <xsd:complexType>
>>             <xsd:sequence>
>>                 <xsd:element minOccurs="0" name="return" nillable="true"
>>  type="xsd:string" />
>>             </xsd:sequence>
>>         </xsd:complexType>
>>     </xsd:element>
>>  </xsd:schema>
>>
>>  Any help you be appreciated
>>
>>  Thanks,
>>  Cathal
>>
>>
>>
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/MTOM-defintition-in-wsdl-tp15651792p15651792.html
>>  Sent from the Axis - User mailing list archive at Nabble.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
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/MTOM-defintition-in-wsdl-tp15651792p15707535.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message