You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Vijay Allam <vi...@revolutionhealth.com> on 2008/04/03 17:32:48 UTC

SoapWithAttachments

I have a third part webservice that returns an attachment. How do I get the
attachment with CXF client. Any example code is apreciated.

--Vijay 

On 4/3/08 9:57 AM, "Cencio" <ce...@gmail.com> wrote:

> 
> Hi,
> 
> i'm still unable to retrieve the wsdl from my service... i post all my info:
> 
> web.xml:
> 
> <web-app>
>         <context-param>
>                 <param-name>contextConfigLocation</param-name>
>                 <param-value>WEB-INF/beans.xml</param-value>
>         </context-param>
> 
>         <listener>
>                 <listener-class>
>                  
> org.springframework.web.context.ContextLoaderListener
>                 </listener-class>
>         </listener>
> 
>         <servlet>
>                 <servlet-name>CXFServlet</servlet-name>
>                 <display-name>CXF Servlet</display-name>
>                 <servlet-class>
>                         org.apache.cxf.transport.servlet.CXFServlet
>                 </servlet-class>
>                 <load-on-startup>1</load-on-startup>
>         </servlet>
> 
>         <servlet-mapping>
>                 <servlet-name>CXFServlet</servlet-name>
>                 <url-pattern>/*</url-pattern>
>         </servlet-mapping>
> </web-app>
> 
> 
> 
> 
> 
> 
> beans.xml:
> 
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xmlns:jaxws="http://cxf.apache.org/jaxws"
>         xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
> 
>         <import resource="classpath:META-INF/cxf/cxf.xml" />
>         <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>         <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>         <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>     <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> 
>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>         <property name="inInterceptors">
>             <list>
>                 <ref bean="logInbound"/>
>             </list>
>         </property>
>         <property name="outInterceptors">
>             <list>
>                 <ref bean="logOutbound"/>
>             </list>
>         </property>
>         <property name="outFaultInterceptors">
>             <list>
>                 <ref bean="logOutbound"/>
>             </list>
>         </property>
>     </bean>
>         <jaxws:endpoint
>           id="ese5"
>           address="ordine"
>           implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
> 
> </beans>
> 
> 
> 
> 
> 
> ordine.wsdl
> 
> 
> 
> <wsdl:definitions
>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>    xmlns:ele="http://www.rivenditore.org/ordiniElements"
>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>    xmlns:ord="http://www.rivenditore.org/Ordine"
>    targetNamespace="http://www.rivenditore.org/Ordine">
> 
>     <wsdl:import namespace="http://www.rivenditore.org/submitOrdineTypes"
> location="submitOrdine.xsd" />
> 
>     <wsdl:types>
>         <xsd:schema
> targetNamespace="http://www.rivenditore.org/ordiniElements"
>            xmlns:soType="http://www.rivenditore.org/submitOrdineTypes">
>            <xsd:element name="notifica" type="xsd:string"/>
>            <xsd:element name="esito" type="soType:esitoType"/>
>            <xsd:element name="ordine" type="soType:ordineType"/>
>         </xsd:schema>
>     </wsdl:types>
> 
>    <wsdl:message name="NotificaMessage">
>       <wsdl:part name="parameter" element="ele:notifica"/>
>    </wsdl:message>
> 
> 
>    <wsdl:message name="SubmitOrdineRequestMessage">
>       <wsdl:part name="parameter" element="ele:ordine"/>
>    </wsdl:message>
> 
>    <wsdl:message name="SubmitOrdineResponseMessage">
>       <wsdl:part name="parameter" element="ele:esito"/>
>    </wsdl:message>
> 
>    <wsdl:portType name="OrdineInterface">
> 
>       <wsdl:operation name="SubmitOrdine">
>          <wsdl:input message="ord:SubmitOrdineRequestMessage"/>
>          <wsdl:output message="ord:SubmitOrdineResponseMessage"/>
>       </wsdl:operation>
> 
>       <wsdl:operation name="Notifica">
>         <wsdl:output message="ord:NotificaMessage"/>
>       </wsdl:operation>
> 
>     </wsdl:portType>
> 
>    <wsdl:binding name="OrdineInterfaceBinding" type="ord:OrdineInterface">
>       <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> 
>       <wsdl:operation name="SubmitOrdine">
>          <soap:operation
> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
>          <wsdl:input>
>             <soap:body use="literal"/>
>          </wsdl:input>
>          <wsdl:output>
>             <soap:body use="literal"/>
>          </wsdl:output>
>       </wsdl:operation>
> 
>       <wsdl:operation name="Notifica">
>          <soap:operation />
>          <wsdl:output>
>             <soap:body use="literal"/>
>          </wsdl:output>
>       </wsdl:operation>
>    </wsdl:binding>
> 
>    <wsdl:service name="OrdineService">
>       <wsdl:port name="OrdineInterfaceEndpoint"
> binding="ord:OrdineInterfaceBinding">
>          <soap:address location="http://localhost:8080/ese5/ordine"/>
>        </wsdl:port>
>    </wsdl:service>
> 
> 
> </wsdl:definitions>
> 
> 
> 
> 
> submitOrdine.xsd:
> 
> 
> 
> <?xml version="1.0"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>     targetNamespace="http://www.rivenditore.org/submitOrdineTypes"
>     xmlns:so="http://www.rivenditore.org/submitOrdineTypes">
> 
>      <xs:complexType name="ordineType">
>         <xs:sequence maxOccurs="unbounded">
>             <xs:element name="articolo" type="so:articoloType"/>
>         </xs:sequence>
>     </xs:complexType>
> 
>     <xs:complexType name="articoloType">
>         <xs:sequence>
>             <xs:element name="codice" type="so:codiceType"/>
>             <xs:element name="quantita" type="xs:positiveInteger"/>
>         </xs:sequence>
>     </xs:complexType>
> 
>     <xs:simpleType name="codiceType">
>         <xs:restriction base="xs:string">
>             <xs:pattern value="[A-Z][A-Z][0-9]{4}"/>
>         </xs:restriction>
>     </xs:simpleType>
> 
>     <xs:complexType name="esitoType">
>         <xs:choice minOccurs="1" maxOccurs="1">
>             <xs:choice>
>                 <xs:element name="ok" type="so:okType"/>
>                 <xs:element name="fail" type="xs:string"/>
>             </xs:choice>
>         </xs:choice>
>     </xs:complexType>
> 
>     <xs:complexType name="okType">
>         <xs:sequence>
>             <xs:element name="idOrdine" type="xs:positiveInteger"  />
>             <xs:element name="totale" type="so:totaleType"  />
>         </xs:sequence>
>     </xs:complexType>
> 
>     <xs:complexType name="totaleType">
>         <xs:simpleContent>
>             <xs:extension base="xs:decimal">
>                 <xs:attribute name="valuta" type="xs:string" default="EUR"
> use="optional"/>
>             </xs:extension>
>         </xs:simpleContent>
>     </xs:complexType>
> 
> </xs:schema>
> 
> 
> 
> 
> I develope both client and server using wsdl2java.
> 
> Thx for any help.


Re: SoapWithAttachments

Posted by Glen Mazza <gl...@verizon.net>.
Here's another example: http://www.jroller.com/gmazza/date/20071102


Am Freitag, den 04.04.2008, 07:58 +0800 schrieb Freeman Fang:
> Hi Vijay,
> 
> We have mtom demo in the kit, which shows how SOAP message
> with an attachment and XML-binary Optimized Packaging(mtom)  work.
> 
> Regards
> 
> Freeman
> 
> Vijay Allam wrote:
> > I have a third part webservice that returns an attachment. How do I get the
> > attachment with CXF client. Any example code is apreciated.
> >
> > --Vijay 
> >
> > On 4/3/08 9:57 AM, "Cencio" <ce...@gmail.com> wrote:
> >
> >   
> >> Hi,
> >>
> >> i'm still unable to retrieve the wsdl from my service... i post all my info:
> >>
> >> web.xml:
> >>
> >> <web-app>
> >>         <context-param>
> >>                 <param-name>contextConfigLocation</param-name>
> >>                 <param-value>WEB-INF/beans.xml</param-value>
> >>         </context-param>
> >>
> >>         <listener>
> >>                 <listener-class>
> >>                  
> >> org.springframework.web.context.ContextLoaderListener
> >>                 </listener-class>
> >>         </listener>
> >>
> >>         <servlet>
> >>                 <servlet-name>CXFServlet</servlet-name>
> >>                 <display-name>CXF Servlet</display-name>
> >>                 <servlet-class>
> >>                         org.apache.cxf.transport.servlet.CXFServlet
> >>                 </servlet-class>
> >>                 <load-on-startup>1</load-on-startup>
> >>         </servlet>
> >>
> >>         <servlet-mapping>
> >>                 <servlet-name>CXFServlet</servlet-name>
> >>                 <url-pattern>/*</url-pattern>
> >>         </servlet-mapping>
> >> </web-app>
> >>
> >>
> >>
> >>
> >>
> >>
> >> beans.xml:
> >>
> >> <beans xmlns="http://www.springframework.org/schema/beans"
> >>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>         xmlns:jaxws="http://cxf.apache.org/jaxws"
> >>         xsi:schemaLocation="
> >> http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans.xsd
> >> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
> >>
> >>         <import resource="classpath:META-INF/cxf/cxf.xml" />
> >>         <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >>         <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> >>         <bean id="logInbound"
> >> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> >>     <bean id="logOutbound"
> >> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> >>
> >>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
> >>         <property name="inInterceptors">
> >>             <list>
> >>                 <ref bean="logInbound"/>
> >>             </list>
> >>         </property>
> >>         <property name="outInterceptors">
> >>             <list>
> >>                 <ref bean="logOutbound"/>
> >>             </list>
> >>         </property>
> >>         <property name="outFaultInterceptors">
> >>             <list>
> >>                 <ref bean="logOutbound"/>
> >>             </list>
> >>         </property>
> >>     </bean>
> >>         <jaxws:endpoint
> >>           id="ese5"
> >>           address="ordine"
> >>           implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
> >>
> >> </beans>
> >>
> >>
> >>
> >>
> >>
> >> ordine.wsdl
> >>
> >>
> >>
> >> <wsdl:definitions
> >>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >>    xmlns:ele="http://www.rivenditore.org/ordiniElements"
> >>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >>    xmlns:ord="http://www.rivenditore.org/Ordine"
> >>    targetNamespace="http://www.rivenditore.org/Ordine">
> >>
> >>     <wsdl:import namespace="http://www.rivenditore.org/submitOrdineTypes"
> >> location="submitOrdine.xsd" />
> >>
> >>     <wsdl:types>
> >>         <xsd:schema
> >> targetNamespace="http://www.rivenditore.org/ordiniElements"
> >>            xmlns:soType="http://www.rivenditore.org/submitOrdineTypes">
> >>            <xsd:element name="notifica" type="xsd:string"/>
> >>            <xsd:element name="esito" type="soType:esitoType"/>
> >>            <xsd:element name="ordine" type="soType:ordineType"/>
> >>         </xsd:schema>
> >>     </wsdl:types>
> >>
> >>    <wsdl:message name="NotificaMessage">
> >>       <wsdl:part name="parameter" element="ele:notifica"/>
> >>    </wsdl:message>
> >>
> >>
> >>    <wsdl:message name="SubmitOrdineRequestMessage">
> >>       <wsdl:part name="parameter" element="ele:ordine"/>
> >>    </wsdl:message>
> >>
> >>    <wsdl:message name="SubmitOrdineResponseMessage">
> >>       <wsdl:part name="parameter" element="ele:esito"/>
> >>    </wsdl:message>
> >>
> >>    <wsdl:portType name="OrdineInterface">
> >>
> >>       <wsdl:operation name="SubmitOrdine">
> >>          <wsdl:input message="ord:SubmitOrdineRequestMessage"/>
> >>          <wsdl:output message="ord:SubmitOrdineResponseMessage"/>
> >>       </wsdl:operation>
> >>
> >>       <wsdl:operation name="Notifica">
> >>         <wsdl:output message="ord:NotificaMessage"/>
> >>       </wsdl:operation>
> >>
> >>     </wsdl:portType>
> >>
> >>    <wsdl:binding name="OrdineInterfaceBinding" type="ord:OrdineInterface">
> >>       <soap:binding style="document"
> >> transport="http://schemas.xmlsoap.org/soap/http"/>
> >>
> >>       <wsdl:operation name="SubmitOrdine">
> >>          <soap:operation
> >> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
> >>          <wsdl:input>
> >>             <soap:body use="literal"/>
> >>          </wsdl:input>
> >>          <wsdl:output>
> >>             <soap:body use="literal"/>
> >>          </wsdl:output>
> >>       </wsdl:operation>
> >>
> >>       <wsdl:operation name="Notifica">
> >>          <soap:operation />
> >>          <wsdl:output>
> >>             <soap:body use="literal"/>
> >>          </wsdl:output>
> >>       </wsdl:operation>
> >>    </wsdl:binding>
> >>
> >>    <wsdl:service name="OrdineService">
> >>       <wsdl:port name="OrdineInterfaceEndpoint"
> >> binding="ord:OrdineInterfaceBinding">
> >>          <soap:address location="http://localhost:8080/ese5/ordine"/>
> >>        </wsdl:port>
> >>    </wsdl:service>
> >>
> >>
> >> </wsdl:definitions>
> >>
> >>
> >>
> >>
> >> submitOrdine.xsd:
> >>
> >>
> >>
> >> <?xml version="1.0"?>
> >> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >>     targetNamespace="http://www.rivenditore.org/submitOrdineTypes"
> >>     xmlns:so="http://www.rivenditore.org/submitOrdineTypes">
> >>
> >>      <xs:complexType name="ordineType">
> >>         <xs:sequence maxOccurs="unbounded">
> >>             <xs:element name="articolo" type="so:articoloType"/>
> >>         </xs:sequence>
> >>     </xs:complexType>
> >>
> >>     <xs:complexType name="articoloType">
> >>         <xs:sequence>
> >>             <xs:element name="codice" type="so:codiceType"/>
> >>             <xs:element name="quantita" type="xs:positiveInteger"/>
> >>         </xs:sequence>
> >>     </xs:complexType>
> >>
> >>     <xs:simpleType name="codiceType">
> >>         <xs:restriction base="xs:string">
> >>             <xs:pattern value="[A-Z][A-Z][0-9]{4}"/>
> >>         </xs:restriction>
> >>     </xs:simpleType>
> >>
> >>     <xs:complexType name="esitoType">
> >>         <xs:choice minOccurs="1" maxOccurs="1">
> >>             <xs:choice>
> >>                 <xs:element name="ok" type="so:okType"/>
> >>                 <xs:element name="fail" type="xs:string"/>
> >>             </xs:choice>
> >>         </xs:choice>
> >>     </xs:complexType>
> >>
> >>     <xs:complexType name="okType">
> >>         <xs:sequence>
> >>             <xs:element name="idOrdine" type="xs:positiveInteger"  />
> >>             <xs:element name="totale" type="so:totaleType"  />
> >>         </xs:sequence>
> >>     </xs:complexType>
> >>
> >>     <xs:complexType name="totaleType">
> >>         <xs:simpleContent>
> >>             <xs:extension base="xs:decimal">
> >>                 <xs:attribute name="valuta" type="xs:string" default="EUR"
> >> use="optional"/>
> >>             </xs:extension>
> >>         </xs:simpleContent>
> >>     </xs:complexType>
> >>
> >> </xs:schema>
> >>
> >>
> >>
> >>
> >> I develope both client and server using wsdl2java.
> >>
> >> Thx for any help.
> >>     
> >
> >
> >   
> 


Re: SoapWithAttachments - missing images

Posted by Vijay Allam <vi...@revolutionhealth.com>.
Yes the image inside the pdf is missing. I have not tried diffing. I will
try and see if I see any truncation in the two files.
I was able to open the PDF even though the image is missing.

--Vijay

On 4/9/08 1:06 PM, "Benson Margulies" <bi...@gmail.com> wrote:

> An image from *inside* the PDF is missing? That's hard to believe. Have you
> just diffed the PDF to see the nature of the problem? Is it just truncated?
> 



Re: SoapWithAttachments - missing images

Posted by Benson Margulies <bi...@gmail.com>.
An image from *inside* the PDF is missing? That's hard to believe. Have you
just diffed the PDF to see the nature of the problem? Is it just truncated?

SoapWithAttachments - missing images

Posted by Vijay Allam <vi...@revolutionhealth.com>.
I was able to get the attachments to the client as per Dan's suggestion.

Howerver, I'm missing an image in the attachment. The attachment are of
type pdf. 

When I use SoapUI to test the service, I was able to get the pdf without a
problem. 

I have tried Xfire client and I see a missing image on the pdf as well.


Any pointers..ideas..

--Vijay 

On 4/4/08 12:26 PM, "Daniel Kulp" <dk...@apache.org> wrote:

> On Friday 04 April 2008, Benson Margulies wrote:
>> SwA is different from MTOM. I don't know of CXF does SwA.
> 
> It does for the jaxws frontend as the jaxws spec requires it.  It's
> pretty much tied to how the jaxws spec requires the code to be generated
> which is why the code lives in the jaxws frontend.   Also, the
> processing is a bit more complex than mtom so we only add the swa
> interceptors if the JAX-WS interface/wsdl indicates that there will be
> swa attachments.
> 
> Dan
> 
> 
>> 
>> On Fri, Apr 4, 2008 at 11:07 AM, Vijay Allam <
>> 
>> vijay.allam@revolutionhealth.com> wrote:
>>> In this case I do not have element that represents the attachment in
>>> WSDL. It comes as part of the Soap message as multi part attachment.
>>> So not sure how do I get the attachment. I could only find code that
>>> can easily get attachment using axis1.1 for the request.
>>> 
>>> --Vijay
>>> 
>>> On 4/3/08 7:58 PM, "Freeman Fang" <fr...@gmail.com> wrote:
>>>> Hi Vijay,
>>>> 
>>>> We have mtom demo in the kit, which shows how SOAP message
>>>> with an attachment and XML-binary Optimized Packaging(mtom)  work.
>>>> 
>>>> Regards
>>>> 
>>>> Freeman
>>>> 
>>>> Vijay Allam wrote:
>>>>> I have a third part webservice that returns an attachment. How do
>>>>> I get
>>> 
>>> the
>>> 
>>>>> attachment with CXF client. Any example code is apreciated.
>>>>> 
>>>>> --Vijay
>>>>> 
>>>>> On 4/3/08 9:57 AM, "Cencio" <ce...@gmail.com> wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> i'm still unable to retrieve the wsdl from my service... i post
>>>>>> all my
>>> 
>>> info:
>>>>>> web.xml:
>>>>>> 
>>>>>> <web-app>
>>>>>>         <context-param>
>>>>>>                 <param-name>contextConfigLocation</param-name>
>>>>>>                 <param-value>WEB-INF/beans.xml</param-value>
>>>>>>         </context-param>
>>>>>> 
>>>>>>         <listener>
>>>>>>                 <listener-class>
>>>>>> 
>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>                 </listener-class>
>>>>>>         </listener>
>>>>>> 
>>>>>>         <servlet>
>>>>>>                 <servlet-name>CXFServlet</servlet-name>
>>>>>>                 <display-name>CXF Servlet</display-name>
>>>>>>                 <servlet-class>
>>>>>>             
>>>>>> org.apache.cxf.transport.servlet.CXFServlet </servlet-class>
>>>>>>                 <load-on-startup>1</load-on-startup>
>>>>>>         </servlet>
>>>>>> 
>>>>>>         <servlet-mapping>
>>>>>>                 <servlet-name>CXFServlet</servlet-name>
>>>>>>                 <url-pattern>/*</url-pattern>
>>>>>>         </servlet-mapping>
>>>>>> </web-app>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> beans.xml:
>>>>>> 
>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>         xmlns:jaxws="http://cxf.apache.org/jaxws"
>>>>>>         xsi:schemaLocation="
>>>>>> http://www.springframework.org/schema/beans
>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>>>>> http://cxf.apache.org/jaxws
>>>>>> http://cxf.apache.org/schemas/jaxws.xsd">
>>>>>> 
>>>>>>         <import resource="classpath:META-INF/cxf/cxf.xml" />
>>>>>>         <import
>>> 
>>> resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>> 
>>>>>>         <import
>>>>>> resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <bean
>>>>>> id="logInbound"
>>>>>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>>>>>>     <bean id="logOutbound"
>>>>>> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>>>>>> 
>>>>>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>>>>>>         <property name="inInterceptors">
>>>>>>             <list>
>>>>>>                 <ref bean="logInbound"/>
>>>>>>             </list>
>>>>>>         </property>
>>>>>>         <property name="outInterceptors">
>>>>>>             <list>
>>>>>>                 <ref bean="logOutbound"/>
>>>>>>             </list>
>>>>>>         </property>
>>>>>>         <property name="outFaultInterceptors">
>>>>>>             <list>
>>>>>>                 <ref bean="logOutbound"/>
>>>>>>             </list>
>>>>>>         </property>
>>>>>>     </bean>
>>>>>>         <jaxws:endpoint
>>>>>>           id="ese5"
>>>>>>           address="ordine"
>>>>>>          
>>>>>> implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
>>>>>> 
>>>>>> </beans>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ordine.wsdl
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> <wsdl:definitions
>>>>>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>>>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>>>>    xmlns:ele="http://www.rivenditore.org/ordiniElements"
>>>>>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>>>    xmlns:ord="http://www.rivenditore.org/Ordine"
>>>>>>    targetNamespace="http://www.rivenditore.org/Ordine">
>>>>>> 
>>>>>>     <wsdl:import namespace="
>>> 
>>> http://www.rivenditore.org/submitOrdineTypes"
>>> 
>>>>>> location="submitOrdine.xsd" />
>>>>>> 
>>>>>>     <wsdl:types>
>>>>>>         <xsd:schema
>>>>>> targetNamespace="http://www.rivenditore.org/ordiniElements"
>>>>>>           
>>>>>> xmlns:soType="http://www.rivenditore.org/submitOrdineTypes
>>> 
>>> ">
>>> 
>>>>>>            <xsd:element name="notifica" type="xsd:string"/>
>>>>>>            <xsd:element name="esito" type="soType:esitoType"/>
>>>>>>            <xsd:element name="ordine" type="soType:ordineType"/>
>>>>>>         </xsd:schema>
>>>>>>     </wsdl:types>
>>>>>> 
>>>>>>    <wsdl:message name="NotificaMessage">
>>>>>>       <wsdl:part name="parameter" element="ele:notifica"/>
>>>>>>    </wsdl:message>
>>>>>> 
>>>>>> 
>>>>>>    <wsdl:message name="SubmitOrdineRequestMessage">
>>>>>>       <wsdl:part name="parameter" element="ele:ordine"/>
>>>>>>    </wsdl:message>
>>>>>> 
>>>>>>    <wsdl:message name="SubmitOrdineResponseMessage">
>>>>>>       <wsdl:part name="parameter" element="ele:esito"/>
>>>>>>    </wsdl:message>
>>>>>> 
>>>>>>    <wsdl:portType name="OrdineInterface">
>>>>>> 
>>>>>>       <wsdl:operation name="SubmitOrdine">
>>>>>>          <wsdl:input message="ord:SubmitOrdineRequestMessage"/>
>>>>>>          <wsdl:output
>>>>>> message="ord:SubmitOrdineResponseMessage"/> </wsdl:operation>
>>>>>> 
>>>>>>       <wsdl:operation name="Notifica">
>>>>>>         <wsdl:output message="ord:NotificaMessage"/>
>>>>>>       </wsdl:operation>
>>>>>> 
>>>>>>     </wsdl:portType>
>>>>>> 
>>>>>>    <wsdl:binding name="OrdineInterfaceBinding"
>>> 
>>> type="ord:OrdineInterface">
>>> 
>>>>>>       <soap:binding style="document"
>>>>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>>>>> 
>>>>>>       <wsdl:operation name="SubmitOrdine">
>>>>>>          <soap:operation
>>>>>> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrd
>>>>>> ine"/> <wsdl:input>
>>>>>>             <soap:body use="literal"/>
>>>>>>          </wsdl:input>
>>>>>>          <wsdl:output>
>>>>>>             <soap:body use="literal"/>
>>>>>>          </wsdl:output>
>>>>>>       </wsdl:operation>
>>>>>> 
>>>>>>       <wsdl:operation name="Notifica">
>>>>>>          <soap:operation />
>>>>>>          <wsdl:output>
>>>>>>             <soap:body use="literal"/>
>>>>>>          </wsdl:output>
>>>>>>       </wsdl:operation>
>>>>>>    </wsdl:binding>
>>>>>> 
>>>>>>    <wsdl:service name="OrdineService">
>>>>>>       <wsdl:port name="OrdineInterfaceEndpoint"
>>>>>> binding="ord:OrdineInterfaceBinding">
>>>>>>          <soap:address
>>>>>> location="http://localhost:8080/ese5/ordine"/> </wsdl:port>
>>>>>>    </wsdl:service>
>>>>>> 
>>>>>> 
>>>>>> </wsdl:definitions>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> submitOrdine.xsd:
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> <?xml version="1.0"?>
>>>>>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>>>>    
>>>>>> targetNamespace="http://www.rivenditore.org/submitOrdineTypes"
>>>>>> xmlns:so="http://www.rivenditore.org/submitOrdineTypes">
>>>>>> 
>>>>>>      <xs:complexType name="ordineType">
>>>>>>         <xs:sequence maxOccurs="unbounded">
>>>>>>             <xs:element name="articolo" type="so:articoloType"/>
>>>>>>         </xs:sequence>
>>>>>>     </xs:complexType>
>>>>>> 
>>>>>>     <xs:complexType name="articoloType">
>>>>>>         <xs:sequence>
>>>>>>             <xs:element name="codice" type="so:codiceType"/>
>>>>>>             <xs:element name="quantita"
>>>>>> type="xs:positiveInteger"/> </xs:sequence>
>>>>>>     </xs:complexType>
>>>>>> 
>>>>>>     <xs:simpleType name="codiceType">
>>>>>>         <xs:restriction base="xs:string">
>>>>>>             <xs:pattern value="[A-Z][A-Z][0-9]{4}"/>
>>>>>>         </xs:restriction>
>>>>>>     </xs:simpleType>
>>>>>> 
>>>>>>     <xs:complexType name="esitoType">
>>>>>>         <xs:choice minOccurs="1" maxOccurs="1">
>>>>>>             <xs:choice>
>>>>>>                 <xs:element name="ok" type="so:okType"/>
>>>>>>                 <xs:element name="fail" type="xs:string"/>
>>>>>>             </xs:choice>
>>>>>>         </xs:choice>
>>>>>>     </xs:complexType>
>>>>>> 
>>>>>>     <xs:complexType name="okType">
>>>>>>         <xs:sequence>
>>>>>>             <xs:element name="idOrdine"
>>>>>> type="xs:positiveInteger"  /> <xs:element name="totale"
>>>>>> type="so:totaleType"  /> </xs:sequence>
>>>>>>     </xs:complexType>
>>>>>> 
>>>>>>     <xs:complexType name="totaleType">
>>>>>>         <xs:simpleContent>
>>>>>>             <xs:extension base="xs:decimal">
>>>>>>                 <xs:attribute name="valuta" type="xs:string"
>>> 
>>> default="EUR"
>>> 
>>>>>> use="optional"/>
>>>>>>             </xs:extension>
>>>>>>         </xs:simpleContent>
>>>>>>     </xs:complexType>
>>>>>> 
>>>>>> </xs:schema>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> I develope both client and server using wsdl2java.
>>>>>> 
>>>>>> Thx for any help.
> 
> 


Re: SoapWithAttachments

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 04 April 2008, Benson Margulies wrote:
> SwA is different from MTOM. I don't know of CXF does SwA.

It does for the jaxws frontend as the jaxws spec requires it.  It's 
pretty much tied to how the jaxws spec requires the code to be generated 
which is why the code lives in the jaxws frontend.   Also, the 
processing is a bit more complex than mtom so we only add the swa 
interceptors if the JAX-WS interface/wsdl indicates that there will be 
swa attachments.

Dan


>
> On Fri, Apr 4, 2008 at 11:07 AM, Vijay Allam <
>
> vijay.allam@revolutionhealth.com> wrote:
> > In this case I do not have element that represents the attachment in
> > WSDL. It comes as part of the Soap message as multi part attachment.
> > So not sure how do I get the attachment. I could only find code that
> > can easily get attachment using axis1.1 for the request.
> >
> > --Vijay
> >
> > On 4/3/08 7:58 PM, "Freeman Fang" <fr...@gmail.com> wrote:
> > > Hi Vijay,
> > >
> > > We have mtom demo in the kit, which shows how SOAP message
> > > with an attachment and XML-binary Optimized Packaging(mtom)  work.
> > >
> > > Regards
> > >
> > > Freeman
> > >
> > > Vijay Allam wrote:
> > >> I have a third part webservice that returns an attachment. How do
> > >> I get
> >
> > the
> >
> > >> attachment with CXF client. Any example code is apreciated.
> > >>
> > >> --Vijay
> > >>
> > >> On 4/3/08 9:57 AM, "Cencio" <ce...@gmail.com> wrote:
> > >>> Hi,
> > >>>
> > >>> i'm still unable to retrieve the wsdl from my service... i post
> > >>> all my
> >
> > info:
> > >>> web.xml:
> > >>>
> > >>> <web-app>
> > >>>         <context-param>
> > >>>                 <param-name>contextConfigLocation</param-name>
> > >>>                 <param-value>WEB-INF/beans.xml</param-value>
> > >>>         </context-param>
> > >>>
> > >>>         <listener>
> > >>>                 <listener-class>
> > >>>
> > >>> org.springframework.web.context.ContextLoaderListener
> > >>>                 </listener-class>
> > >>>         </listener>
> > >>>
> > >>>         <servlet>
> > >>>                 <servlet-name>CXFServlet</servlet-name>
> > >>>                 <display-name>CXF Servlet</display-name>
> > >>>                 <servlet-class>
> > >>>                        
> > >>> org.apache.cxf.transport.servlet.CXFServlet </servlet-class>
> > >>>                 <load-on-startup>1</load-on-startup>
> > >>>         </servlet>
> > >>>
> > >>>         <servlet-mapping>
> > >>>                 <servlet-name>CXFServlet</servlet-name>
> > >>>                 <url-pattern>/*</url-pattern>
> > >>>         </servlet-mapping>
> > >>> </web-app>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> beans.xml:
> > >>>
> > >>> <beans xmlns="http://www.springframework.org/schema/beans"
> > >>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >>>         xmlns:jaxws="http://cxf.apache.org/jaxws"
> > >>>         xsi:schemaLocation="
> > >>> http://www.springframework.org/schema/beans
> > >>> http://www.springframework.org/schema/beans/spring-beans.xsd
> > >>> http://cxf.apache.org/jaxws
> > >>> http://cxf.apache.org/schemas/jaxws.xsd">
> > >>>
> > >>>         <import resource="classpath:META-INF/cxf/cxf.xml" />
> > >>>         <import
> >
> > resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >
> > >>>         <import
> > >>> resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <bean
> > >>> id="logInbound"
> > >>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> > >>>     <bean id="logOutbound"
> > >>> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> > >>>
> > >>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
> > >>>         <property name="inInterceptors">
> > >>>             <list>
> > >>>                 <ref bean="logInbound"/>
> > >>>             </list>
> > >>>         </property>
> > >>>         <property name="outInterceptors">
> > >>>             <list>
> > >>>                 <ref bean="logOutbound"/>
> > >>>             </list>
> > >>>         </property>
> > >>>         <property name="outFaultInterceptors">
> > >>>             <list>
> > >>>                 <ref bean="logOutbound"/>
> > >>>             </list>
> > >>>         </property>
> > >>>     </bean>
> > >>>         <jaxws:endpoint
> > >>>           id="ese5"
> > >>>           address="ordine"
> > >>>          
> > >>> implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
> > >>>
> > >>> </beans>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> ordine.wsdl
> > >>>
> > >>>
> > >>>
> > >>> <wsdl:definitions
> > >>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > >>>    xmlns:ele="http://www.rivenditore.org/ordiniElements"
> > >>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >>>    xmlns:ord="http://www.rivenditore.org/Ordine"
> > >>>    targetNamespace="http://www.rivenditore.org/Ordine">
> > >>>
> > >>>     <wsdl:import namespace="
> >
> > http://www.rivenditore.org/submitOrdineTypes"
> >
> > >>> location="submitOrdine.xsd" />
> > >>>
> > >>>     <wsdl:types>
> > >>>         <xsd:schema
> > >>> targetNamespace="http://www.rivenditore.org/ordiniElements"
> > >>>           
> > >>> xmlns:soType="http://www.rivenditore.org/submitOrdineTypes
> >
> > ">
> >
> > >>>            <xsd:element name="notifica" type="xsd:string"/>
> > >>>            <xsd:element name="esito" type="soType:esitoType"/>
> > >>>            <xsd:element name="ordine" type="soType:ordineType"/>
> > >>>         </xsd:schema>
> > >>>     </wsdl:types>
> > >>>
> > >>>    <wsdl:message name="NotificaMessage">
> > >>>       <wsdl:part name="parameter" element="ele:notifica"/>
> > >>>    </wsdl:message>
> > >>>
> > >>>
> > >>>    <wsdl:message name="SubmitOrdineRequestMessage">
> > >>>       <wsdl:part name="parameter" element="ele:ordine"/>
> > >>>    </wsdl:message>
> > >>>
> > >>>    <wsdl:message name="SubmitOrdineResponseMessage">
> > >>>       <wsdl:part name="parameter" element="ele:esito"/>
> > >>>    </wsdl:message>
> > >>>
> > >>>    <wsdl:portType name="OrdineInterface">
> > >>>
> > >>>       <wsdl:operation name="SubmitOrdine">
> > >>>          <wsdl:input message="ord:SubmitOrdineRequestMessage"/>
> > >>>          <wsdl:output
> > >>> message="ord:SubmitOrdineResponseMessage"/> </wsdl:operation>
> > >>>
> > >>>       <wsdl:operation name="Notifica">
> > >>>         <wsdl:output message="ord:NotificaMessage"/>
> > >>>       </wsdl:operation>
> > >>>
> > >>>     </wsdl:portType>
> > >>>
> > >>>    <wsdl:binding name="OrdineInterfaceBinding"
> >
> > type="ord:OrdineInterface">
> >
> > >>>       <soap:binding style="document"
> > >>> transport="http://schemas.xmlsoap.org/soap/http"/>
> > >>>
> > >>>       <wsdl:operation name="SubmitOrdine">
> > >>>          <soap:operation
> > >>> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrd
> > >>>ine"/> <wsdl:input>
> > >>>             <soap:body use="literal"/>
> > >>>          </wsdl:input>
> > >>>          <wsdl:output>
> > >>>             <soap:body use="literal"/>
> > >>>          </wsdl:output>
> > >>>       </wsdl:operation>
> > >>>
> > >>>       <wsdl:operation name="Notifica">
> > >>>          <soap:operation />
> > >>>          <wsdl:output>
> > >>>             <soap:body use="literal"/>
> > >>>          </wsdl:output>
> > >>>       </wsdl:operation>
> > >>>    </wsdl:binding>
> > >>>
> > >>>    <wsdl:service name="OrdineService">
> > >>>       <wsdl:port name="OrdineInterfaceEndpoint"
> > >>> binding="ord:OrdineInterfaceBinding">
> > >>>          <soap:address
> > >>> location="http://localhost:8080/ese5/ordine"/> </wsdl:port>
> > >>>    </wsdl:service>
> > >>>
> > >>>
> > >>> </wsdl:definitions>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> submitOrdine.xsd:
> > >>>
> > >>>
> > >>>
> > >>> <?xml version="1.0"?>
> > >>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >>>    
> > >>> targetNamespace="http://www.rivenditore.org/submitOrdineTypes"
> > >>> xmlns:so="http://www.rivenditore.org/submitOrdineTypes">
> > >>>
> > >>>      <xs:complexType name="ordineType">
> > >>>         <xs:sequence maxOccurs="unbounded">
> > >>>             <xs:element name="articolo" type="so:articoloType"/>
> > >>>         </xs:sequence>
> > >>>     </xs:complexType>
> > >>>
> > >>>     <xs:complexType name="articoloType">
> > >>>         <xs:sequence>
> > >>>             <xs:element name="codice" type="so:codiceType"/>
> > >>>             <xs:element name="quantita"
> > >>> type="xs:positiveInteger"/> </xs:sequence>
> > >>>     </xs:complexType>
> > >>>
> > >>>     <xs:simpleType name="codiceType">
> > >>>         <xs:restriction base="xs:string">
> > >>>             <xs:pattern value="[A-Z][A-Z][0-9]{4}"/>
> > >>>         </xs:restriction>
> > >>>     </xs:simpleType>
> > >>>
> > >>>     <xs:complexType name="esitoType">
> > >>>         <xs:choice minOccurs="1" maxOccurs="1">
> > >>>             <xs:choice>
> > >>>                 <xs:element name="ok" type="so:okType"/>
> > >>>                 <xs:element name="fail" type="xs:string"/>
> > >>>             </xs:choice>
> > >>>         </xs:choice>
> > >>>     </xs:complexType>
> > >>>
> > >>>     <xs:complexType name="okType">
> > >>>         <xs:sequence>
> > >>>             <xs:element name="idOrdine"
> > >>> type="xs:positiveInteger"  /> <xs:element name="totale"
> > >>> type="so:totaleType"  /> </xs:sequence>
> > >>>     </xs:complexType>
> > >>>
> > >>>     <xs:complexType name="totaleType">
> > >>>         <xs:simpleContent>
> > >>>             <xs:extension base="xs:decimal">
> > >>>                 <xs:attribute name="valuta" type="xs:string"
> >
> > default="EUR"
> >
> > >>> use="optional"/>
> > >>>             </xs:extension>
> > >>>         </xs:simpleContent>
> > >>>     </xs:complexType>
> > >>>
> > >>> </xs:schema>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> I develope both client and server using wsdl2java.
> > >>>
> > >>> Thx for any help.



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: SoapWithAttachments

Posted by Benson Margulies <bi...@gmail.com>.
SwA is different from MTOM. I don't know of CXF does SwA.

On Fri, Apr 4, 2008 at 11:07 AM, Vijay Allam <
vijay.allam@revolutionhealth.com> wrote:

> In this case I do not have element that represents the attachment in WSDL.
> It comes as part of the Soap message as multi part attachment. So not sure
> how do I get the attachment. I could only find code that can easily get
> attachment using axis1.1 for the request.
>
> --Vijay
>
>
> On 4/3/08 7:58 PM, "Freeman Fang" <fr...@gmail.com> wrote:
>
> > Hi Vijay,
> >
> > We have mtom demo in the kit, which shows how SOAP message
> > with an attachment and XML-binary Optimized Packaging(mtom)  work.
> >
> > Regards
> >
> > Freeman
> >
> > Vijay Allam wrote:
> >> I have a third part webservice that returns an attachment. How do I get
> the
> >> attachment with CXF client. Any example code is apreciated.
> >>
> >> --Vijay
> >>
> >> On 4/3/08 9:57 AM, "Cencio" <ce...@gmail.com> wrote:
> >>
> >>
> >>> Hi,
> >>>
> >>> i'm still unable to retrieve the wsdl from my service... i post all my
> info:
> >>>
> >>> web.xml:
> >>>
> >>> <web-app>
> >>>         <context-param>
> >>>                 <param-name>contextConfigLocation</param-name>
> >>>                 <param-value>WEB-INF/beans.xml</param-value>
> >>>         </context-param>
> >>>
> >>>         <listener>
> >>>                 <listener-class>
> >>>
> >>> org.springframework.web.context.ContextLoaderListener
> >>>                 </listener-class>
> >>>         </listener>
> >>>
> >>>         <servlet>
> >>>                 <servlet-name>CXFServlet</servlet-name>
> >>>                 <display-name>CXF Servlet</display-name>
> >>>                 <servlet-class>
> >>>                         org.apache.cxf.transport.servlet.CXFServlet
> >>>                 </servlet-class>
> >>>                 <load-on-startup>1</load-on-startup>
> >>>         </servlet>
> >>>
> >>>         <servlet-mapping>
> >>>                 <servlet-name>CXFServlet</servlet-name>
> >>>                 <url-pattern>/*</url-pattern>
> >>>         </servlet-mapping>
> >>> </web-app>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> beans.xml:
> >>>
> >>> <beans xmlns="http://www.springframework.org/schema/beans"
> >>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>         xmlns:jaxws="http://cxf.apache.org/jaxws"
> >>>         xsi:schemaLocation="
> >>> http://www.springframework.org/schema/beans
> >>> http://www.springframework.org/schema/beans/spring-beans.xsd
> >>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
> >>>
> >>>         <import resource="classpath:META-INF/cxf/cxf.xml" />
> >>>         <import
> resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >>>         <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> >>>         <bean id="logInbound"
> >>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> >>>     <bean id="logOutbound"
> >>> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> >>>
> >>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
> >>>         <property name="inInterceptors">
> >>>             <list>
> >>>                 <ref bean="logInbound"/>
> >>>             </list>
> >>>         </property>
> >>>         <property name="outInterceptors">
> >>>             <list>
> >>>                 <ref bean="logOutbound"/>
> >>>             </list>
> >>>         </property>
> >>>         <property name="outFaultInterceptors">
> >>>             <list>
> >>>                 <ref bean="logOutbound"/>
> >>>             </list>
> >>>         </property>
> >>>     </bean>
> >>>         <jaxws:endpoint
> >>>           id="ese5"
> >>>           address="ordine"
> >>>           implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
> >>>
> >>> </beans>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> ordine.wsdl
> >>>
> >>>
> >>>
> >>> <wsdl:definitions
> >>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >>>    xmlns:ele="http://www.rivenditore.org/ordiniElements"
> >>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >>>    xmlns:ord="http://www.rivenditore.org/Ordine"
> >>>    targetNamespace="http://www.rivenditore.org/Ordine">
> >>>
> >>>     <wsdl:import namespace="
> http://www.rivenditore.org/submitOrdineTypes"
> >>> location="submitOrdine.xsd" />
> >>>
> >>>     <wsdl:types>
> >>>         <xsd:schema
> >>> targetNamespace="http://www.rivenditore.org/ordiniElements"
> >>>            xmlns:soType="http://www.rivenditore.org/submitOrdineTypes
> ">
> >>>            <xsd:element name="notifica" type="xsd:string"/>
> >>>            <xsd:element name="esito" type="soType:esitoType"/>
> >>>            <xsd:element name="ordine" type="soType:ordineType"/>
> >>>         </xsd:schema>
> >>>     </wsdl:types>
> >>>
> >>>    <wsdl:message name="NotificaMessage">
> >>>       <wsdl:part name="parameter" element="ele:notifica"/>
> >>>    </wsdl:message>
> >>>
> >>>
> >>>    <wsdl:message name="SubmitOrdineRequestMessage">
> >>>       <wsdl:part name="parameter" element="ele:ordine"/>
> >>>    </wsdl:message>
> >>>
> >>>    <wsdl:message name="SubmitOrdineResponseMessage">
> >>>       <wsdl:part name="parameter" element="ele:esito"/>
> >>>    </wsdl:message>
> >>>
> >>>    <wsdl:portType name="OrdineInterface">
> >>>
> >>>       <wsdl:operation name="SubmitOrdine">
> >>>          <wsdl:input message="ord:SubmitOrdineRequestMessage"/>
> >>>          <wsdl:output message="ord:SubmitOrdineResponseMessage"/>
> >>>       </wsdl:operation>
> >>>
> >>>       <wsdl:operation name="Notifica">
> >>>         <wsdl:output message="ord:NotificaMessage"/>
> >>>       </wsdl:operation>
> >>>
> >>>     </wsdl:portType>
> >>>
> >>>    <wsdl:binding name="OrdineInterfaceBinding"
> type="ord:OrdineInterface">
> >>>       <soap:binding style="document"
> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
> >>>
> >>>       <wsdl:operation name="SubmitOrdine">
> >>>          <soap:operation
> >>> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
> >>>          <wsdl:input>
> >>>             <soap:body use="literal"/>
> >>>          </wsdl:input>
> >>>          <wsdl:output>
> >>>             <soap:body use="literal"/>
> >>>          </wsdl:output>
> >>>       </wsdl:operation>
> >>>
> >>>       <wsdl:operation name="Notifica">
> >>>          <soap:operation />
> >>>          <wsdl:output>
> >>>             <soap:body use="literal"/>
> >>>          </wsdl:output>
> >>>       </wsdl:operation>
> >>>    </wsdl:binding>
> >>>
> >>>    <wsdl:service name="OrdineService">
> >>>       <wsdl:port name="OrdineInterfaceEndpoint"
> >>> binding="ord:OrdineInterfaceBinding">
> >>>          <soap:address location="http://localhost:8080/ese5/ordine"/>
> >>>        </wsdl:port>
> >>>    </wsdl:service>
> >>>
> >>>
> >>> </wsdl:definitions>
> >>>
> >>>
> >>>
> >>>
> >>> submitOrdine.xsd:
> >>>
> >>>
> >>>
> >>> <?xml version="1.0"?>
> >>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >>>     targetNamespace="http://www.rivenditore.org/submitOrdineTypes"
> >>>     xmlns:so="http://www.rivenditore.org/submitOrdineTypes">
> >>>
> >>>      <xs:complexType name="ordineType">
> >>>         <xs:sequence maxOccurs="unbounded">
> >>>             <xs:element name="articolo" type="so:articoloType"/>
> >>>         </xs:sequence>
> >>>     </xs:complexType>
> >>>
> >>>     <xs:complexType name="articoloType">
> >>>         <xs:sequence>
> >>>             <xs:element name="codice" type="so:codiceType"/>
> >>>             <xs:element name="quantita" type="xs:positiveInteger"/>
> >>>         </xs:sequence>
> >>>     </xs:complexType>
> >>>
> >>>     <xs:simpleType name="codiceType">
> >>>         <xs:restriction base="xs:string">
> >>>             <xs:pattern value="[A-Z][A-Z][0-9]{4}"/>
> >>>         </xs:restriction>
> >>>     </xs:simpleType>
> >>>
> >>>     <xs:complexType name="esitoType">
> >>>         <xs:choice minOccurs="1" maxOccurs="1">
> >>>             <xs:choice>
> >>>                 <xs:element name="ok" type="so:okType"/>
> >>>                 <xs:element name="fail" type="xs:string"/>
> >>>             </xs:choice>
> >>>         </xs:choice>
> >>>     </xs:complexType>
> >>>
> >>>     <xs:complexType name="okType">
> >>>         <xs:sequence>
> >>>             <xs:element name="idOrdine" type="xs:positiveInteger"  />
> >>>             <xs:element name="totale" type="so:totaleType"  />
> >>>         </xs:sequence>
> >>>     </xs:complexType>
> >>>
> >>>     <xs:complexType name="totaleType">
> >>>         <xs:simpleContent>
> >>>             <xs:extension base="xs:decimal">
> >>>                 <xs:attribute name="valuta" type="xs:string"
> default="EUR"
> >>> use="optional"/>
> >>>             </xs:extension>
> >>>         </xs:simpleContent>
> >>>     </xs:complexType>
> >>>
> >>> </xs:schema>
> >>>
> >>>
> >>>
> >>>
> >>> I develope both client and server using wsdl2java.
> >>>
> >>> Thx for any help.
> >>>
> >>
> >>
> >>
> >
>
>

Re: SoapWithAttachments

Posted by Vijay Allam <vi...@revolutionhealth.com>.
 

Thanks a lot.  This is what I'm looking for to get the attachment from the
client. ((BindingProvider)proxy).getRequestContext().get("ATTACHMENTS");

It was a third party web service. I have already have the interceptor but I
did not know how to get the attachment back to the client.

This will solve my problem.

--Thanks
Vijay 


On 4/4/08 12:15 PM, "Daniel Kulp" <dk...@apache.org> wrote:

> 
> Ick...  If their wsdl properly declared the attachments like a good
> contract would, it would be easy as the generated code would just handle
> it.
> 
> I just spent some time trying to figure out something and I'm not
> succeeding unless you write an interceptor.  The Message object sent
> into an interceptor has the attachements collection on it.   Thus, if
> you did something like:
> 
> 
> public static class MyInterceptor
>     extends AbstractPhaseInterceptor<Message> {
> 
>     public MyInterceptor() {
>         super(Phase.USER_LOGICAL);
>     }
> 
>     public void handleMessage(Message message) throws Fault {
>         message.put("ATTACHMENTS", message.getAttachments());
>     }
> }
> 
> That will copy the attachment list to the message properties and you can
> then retrieve it in the client code like:
> 
> ((BindingProvider)proxy).getRequestContext().get("ATTACHMENTS");
> 
> 
> Dan
> 
> 
> 
> On Friday 04 April 2008, Vijay Allam wrote:
>> In this case I do not have element that represents the attachment in
>> WSDL. It comes as part of the Soap message as multi part attachment.
>> So not sure how do I get the attachment. I could only find code that
>> can easily get attachment using axis1.1 for the request.
>> 
>> --Vijay
>> 
>> On 4/3/08 7:58 PM, "Freeman Fang" <fr...@gmail.com> wrote:
>>> Hi Vijay,
>>> 
>>> We have mtom demo in the kit, which shows how SOAP message
>>> with an attachment and XML-binary Optimized Packaging(mtom)  work.
>>> 
>>> Regards
>>> 
>>> Freeman
>>> 
>>> Vijay Allam wrote:
>>>> I have a third part webservice that returns an attachment. How do I
>>>> get the attachment with CXF client. Any example code is apreciated.
>>>> 
>>>> --Vijay
> 
> 


Re: SoapWithAttachments

Posted by Daniel Kulp <dk...@apache.org>.
Ick...  If their wsdl properly declared the attachments like a good 
contract would, it would be easy as the generated code would just handle 
it.

I just spent some time trying to figure out something and I'm not 
succeeding unless you write an interceptor.  The Message object sent 
into an interceptor has the attachements collection on it.   Thus, if 
you did something like:


public static class MyInterceptor 
    extends AbstractPhaseInterceptor<Message> {

    public MyInterceptor() {
        super(Phase.USER_LOGICAL);
    }

    public void handleMessage(Message message) throws Fault {
        message.put("ATTACHMENTS", message.getAttachments());
    }
}

That will copy the attachment list to the message properties and you can 
then retrieve it in the client code like:

((BindingProvider)proxy).getRequestContext().get("ATTACHMENTS");


Dan



On Friday 04 April 2008, Vijay Allam wrote:
> In this case I do not have element that represents the attachment in
> WSDL. It comes as part of the Soap message as multi part attachment.
> So not sure how do I get the attachment. I could only find code that
> can easily get attachment using axis1.1 for the request.
>
> --Vijay
>
> On 4/3/08 7:58 PM, "Freeman Fang" <fr...@gmail.com> wrote:
> > Hi Vijay,
> >
> > We have mtom demo in the kit, which shows how SOAP message
> > with an attachment and XML-binary Optimized Packaging(mtom)  work.
> >
> > Regards
> >
> > Freeman
> >
> > Vijay Allam wrote:
> >> I have a third part webservice that returns an attachment. How do I
> >> get the attachment with CXF client. Any example code is apreciated.
> >>
> >> --Vijay



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: SoapWithAttachments

Posted by Vijay Allam <vi...@revolutionhealth.com>.
In this case I do not have element that represents the attachment in WSDL.
It comes as part of the Soap message as multi part attachment. So not sure
how do I get the attachment. I could only find code that can easily get
attachment using axis1.1 for the request.

--Vijay


On 4/3/08 7:58 PM, "Freeman Fang" <fr...@gmail.com> wrote:

> Hi Vijay,
> 
> We have mtom demo in the kit, which shows how SOAP message
> with an attachment and XML-binary Optimized Packaging(mtom)  work.
> 
> Regards
> 
> Freeman
> 
> Vijay Allam wrote:
>> I have a third part webservice that returns an attachment. How do I get the
>> attachment with CXF client. Any example code is apreciated.
>> 
>> --Vijay 
>> 
>> On 4/3/08 9:57 AM, "Cencio" <ce...@gmail.com> wrote:
>> 
>>   
>>> Hi,
>>> 
>>> i'm still unable to retrieve the wsdl from my service... i post all my info:
>>> 
>>> web.xml:
>>> 
>>> <web-app>
>>>         <context-param>
>>>                 <param-name>contextConfigLocation</param-name>
>>>                 <param-value>WEB-INF/beans.xml</param-value>
>>>         </context-param>
>>> 
>>>         <listener>
>>>                 <listener-class>
>>>                
>>> org.springframework.web.context.ContextLoaderListener
>>>                 </listener-class>
>>>         </listener>
>>> 
>>>         <servlet>
>>>                 <servlet-name>CXFServlet</servlet-name>
>>>                 <display-name>CXF Servlet</display-name>
>>>                 <servlet-class>
>>>                         org.apache.cxf.transport.servlet.CXFServlet
>>>                 </servlet-class>
>>>                 <load-on-startup>1</load-on-startup>
>>>         </servlet>
>>> 
>>>         <servlet-mapping>
>>>                 <servlet-name>CXFServlet</servlet-name>
>>>                 <url-pattern>/*</url-pattern>
>>>         </servlet-mapping>
>>> </web-app>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> beans.xml:
>>> 
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>         xmlns:jaxws="http://cxf.apache.org/jaxws"
>>>         xsi:schemaLocation="
>>> http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>>> 
>>>         <import resource="classpath:META-INF/cxf/cxf.xml" />
>>>         <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>>         <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>>         <bean id="logInbound"
>>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>>>     <bean id="logOutbound"
>>> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>>> 
>>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>>>         <property name="inInterceptors">
>>>             <list>
>>>                 <ref bean="logInbound"/>
>>>             </list>
>>>         </property>
>>>         <property name="outInterceptors">
>>>             <list>
>>>                 <ref bean="logOutbound"/>
>>>             </list>
>>>         </property>
>>>         <property name="outFaultInterceptors">
>>>             <list>
>>>                 <ref bean="logOutbound"/>
>>>             </list>
>>>         </property>
>>>     </bean>
>>>         <jaxws:endpoint
>>>           id="ese5"
>>>           address="ordine"
>>>           implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
>>> 
>>> </beans>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ordine.wsdl
>>> 
>>> 
>>> 
>>> <wsdl:definitions
>>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>    xmlns:ele="http://www.rivenditore.org/ordiniElements"
>>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>    xmlns:ord="http://www.rivenditore.org/Ordine"
>>>    targetNamespace="http://www.rivenditore.org/Ordine">
>>> 
>>>     <wsdl:import namespace="http://www.rivenditore.org/submitOrdineTypes"
>>> location="submitOrdine.xsd" />
>>> 
>>>     <wsdl:types>
>>>         <xsd:schema
>>> targetNamespace="http://www.rivenditore.org/ordiniElements"
>>>            xmlns:soType="http://www.rivenditore.org/submitOrdineTypes">
>>>            <xsd:element name="notifica" type="xsd:string"/>
>>>            <xsd:element name="esito" type="soType:esitoType"/>
>>>            <xsd:element name="ordine" type="soType:ordineType"/>
>>>         </xsd:schema>
>>>     </wsdl:types>
>>> 
>>>    <wsdl:message name="NotificaMessage">
>>>       <wsdl:part name="parameter" element="ele:notifica"/>
>>>    </wsdl:message>
>>> 
>>> 
>>>    <wsdl:message name="SubmitOrdineRequestMessage">
>>>       <wsdl:part name="parameter" element="ele:ordine"/>
>>>    </wsdl:message>
>>> 
>>>    <wsdl:message name="SubmitOrdineResponseMessage">
>>>       <wsdl:part name="parameter" element="ele:esito"/>
>>>    </wsdl:message>
>>> 
>>>    <wsdl:portType name="OrdineInterface">
>>> 
>>>       <wsdl:operation name="SubmitOrdine">
>>>          <wsdl:input message="ord:SubmitOrdineRequestMessage"/>
>>>          <wsdl:output message="ord:SubmitOrdineResponseMessage"/>
>>>       </wsdl:operation>
>>> 
>>>       <wsdl:operation name="Notifica">
>>>         <wsdl:output message="ord:NotificaMessage"/>
>>>       </wsdl:operation>
>>> 
>>>     </wsdl:portType>
>>> 
>>>    <wsdl:binding name="OrdineInterfaceBinding" type="ord:OrdineInterface">
>>>       <soap:binding style="document"
>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>> 
>>>       <wsdl:operation name="SubmitOrdine">
>>>          <soap:operation
>>> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
>>>          <wsdl:input>
>>>             <soap:body use="literal"/>
>>>          </wsdl:input>
>>>          <wsdl:output>
>>>             <soap:body use="literal"/>
>>>          </wsdl:output>
>>>       </wsdl:operation>
>>> 
>>>       <wsdl:operation name="Notifica">
>>>          <soap:operation />
>>>          <wsdl:output>
>>>             <soap:body use="literal"/>
>>>          </wsdl:output>
>>>       </wsdl:operation>
>>>    </wsdl:binding>
>>> 
>>>    <wsdl:service name="OrdineService">
>>>       <wsdl:port name="OrdineInterfaceEndpoint"
>>> binding="ord:OrdineInterfaceBinding">
>>>          <soap:address location="http://localhost:8080/ese5/ordine"/>
>>>        </wsdl:port>
>>>    </wsdl:service>
>>> 
>>> 
>>> </wsdl:definitions>
>>> 
>>> 
>>> 
>>> 
>>> submitOrdine.xsd:
>>> 
>>> 
>>> 
>>> <?xml version="1.0"?>
>>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>     targetNamespace="http://www.rivenditore.org/submitOrdineTypes"
>>>     xmlns:so="http://www.rivenditore.org/submitOrdineTypes">
>>> 
>>>      <xs:complexType name="ordineType">
>>>         <xs:sequence maxOccurs="unbounded">
>>>             <xs:element name="articolo" type="so:articoloType"/>
>>>         </xs:sequence>
>>>     </xs:complexType>
>>> 
>>>     <xs:complexType name="articoloType">
>>>         <xs:sequence>
>>>             <xs:element name="codice" type="so:codiceType"/>
>>>             <xs:element name="quantita" type="xs:positiveInteger"/>
>>>         </xs:sequence>
>>>     </xs:complexType>
>>> 
>>>     <xs:simpleType name="codiceType">
>>>         <xs:restriction base="xs:string">
>>>             <xs:pattern value="[A-Z][A-Z][0-9]{4}"/>
>>>         </xs:restriction>
>>>     </xs:simpleType>
>>> 
>>>     <xs:complexType name="esitoType">
>>>         <xs:choice minOccurs="1" maxOccurs="1">
>>>             <xs:choice>
>>>                 <xs:element name="ok" type="so:okType"/>
>>>                 <xs:element name="fail" type="xs:string"/>
>>>             </xs:choice>
>>>         </xs:choice>
>>>     </xs:complexType>
>>> 
>>>     <xs:complexType name="okType">
>>>         <xs:sequence>
>>>             <xs:element name="idOrdine" type="xs:positiveInteger"  />
>>>             <xs:element name="totale" type="so:totaleType"  />
>>>         </xs:sequence>
>>>     </xs:complexType>
>>> 
>>>     <xs:complexType name="totaleType">
>>>         <xs:simpleContent>
>>>             <xs:extension base="xs:decimal">
>>>                 <xs:attribute name="valuta" type="xs:string" default="EUR"
>>> use="optional"/>
>>>             </xs:extension>
>>>         </xs:simpleContent>
>>>     </xs:complexType>
>>> 
>>> </xs:schema>
>>> 
>>> 
>>> 
>>> 
>>> I develope both client and server using wsdl2java.
>>> 
>>> Thx for any help.
>>>     
>> 
>> 
>>   
> 


Re: SoapWithAttachments

Posted by Freeman Fang <fr...@gmail.com>.
Hi Vijay,

We have mtom demo in the kit, which shows how SOAP message
with an attachment and XML-binary Optimized Packaging(mtom)  work.

Regards

Freeman

Vijay Allam wrote:
> I have a third part webservice that returns an attachment. How do I get the
> attachment with CXF client. Any example code is apreciated.
>
> --Vijay 
>
> On 4/3/08 9:57 AM, "Cencio" <ce...@gmail.com> wrote:
>
>   
>> Hi,
>>
>> i'm still unable to retrieve the wsdl from my service... i post all my info:
>>
>> web.xml:
>>
>> <web-app>
>>         <context-param>
>>                 <param-name>contextConfigLocation</param-name>
>>                 <param-value>WEB-INF/beans.xml</param-value>
>>         </context-param>
>>
>>         <listener>
>>                 <listener-class>
>>                  
>> org.springframework.web.context.ContextLoaderListener
>>                 </listener-class>
>>         </listener>
>>
>>         <servlet>
>>                 <servlet-name>CXFServlet</servlet-name>
>>                 <display-name>CXF Servlet</display-name>
>>                 <servlet-class>
>>                         org.apache.cxf.transport.servlet.CXFServlet
>>                 </servlet-class>
>>                 <load-on-startup>1</load-on-startup>
>>         </servlet>
>>
>>         <servlet-mapping>
>>                 <servlet-name>CXFServlet</servlet-name>
>>                 <url-pattern>/*</url-pattern>
>>         </servlet-mapping>
>> </web-app>
>>
>>
>>
>>
>>
>>
>> beans.xml:
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>         xmlns:jaxws="http://cxf.apache.org/jaxws"
>>         xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>>
>>         <import resource="classpath:META-INF/cxf/cxf.xml" />
>>         <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>         <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>         <bean id="logInbound"
>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>>     <bean id="logOutbound"
>> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>>
>>     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>>         <property name="inInterceptors">
>>             <list>
>>                 <ref bean="logInbound"/>
>>             </list>
>>         </property>
>>         <property name="outInterceptors">
>>             <list>
>>                 <ref bean="logOutbound"/>
>>             </list>
>>         </property>
>>         <property name="outFaultInterceptors">
>>             <list>
>>                 <ref bean="logOutbound"/>
>>             </list>
>>         </property>
>>     </bean>
>>         <jaxws:endpoint
>>           id="ese5"
>>           address="ordine"
>>           implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
>>
>> </beans>
>>
>>
>>
>>
>>
>> ordine.wsdl
>>
>>
>>
>> <wsdl:definitions
>>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>    xmlns:ele="http://www.rivenditore.org/ordiniElements"
>>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>    xmlns:ord="http://www.rivenditore.org/Ordine"
>>    targetNamespace="http://www.rivenditore.org/Ordine">
>>
>>     <wsdl:import namespace="http://www.rivenditore.org/submitOrdineTypes"
>> location="submitOrdine.xsd" />
>>
>>     <wsdl:types>
>>         <xsd:schema
>> targetNamespace="http://www.rivenditore.org/ordiniElements"
>>            xmlns:soType="http://www.rivenditore.org/submitOrdineTypes">
>>            <xsd:element name="notifica" type="xsd:string"/>
>>            <xsd:element name="esito" type="soType:esitoType"/>
>>            <xsd:element name="ordine" type="soType:ordineType"/>
>>         </xsd:schema>
>>     </wsdl:types>
>>
>>    <wsdl:message name="NotificaMessage">
>>       <wsdl:part name="parameter" element="ele:notifica"/>
>>    </wsdl:message>
>>
>>
>>    <wsdl:message name="SubmitOrdineRequestMessage">
>>       <wsdl:part name="parameter" element="ele:ordine"/>
>>    </wsdl:message>
>>
>>    <wsdl:message name="SubmitOrdineResponseMessage">
>>       <wsdl:part name="parameter" element="ele:esito"/>
>>    </wsdl:message>
>>
>>    <wsdl:portType name="OrdineInterface">
>>
>>       <wsdl:operation name="SubmitOrdine">
>>          <wsdl:input message="ord:SubmitOrdineRequestMessage"/>
>>          <wsdl:output message="ord:SubmitOrdineResponseMessage"/>
>>       </wsdl:operation>
>>
>>       <wsdl:operation name="Notifica">
>>         <wsdl:output message="ord:NotificaMessage"/>
>>       </wsdl:operation>
>>
>>     </wsdl:portType>
>>
>>    <wsdl:binding name="OrdineInterfaceBinding" type="ord:OrdineInterface">
>>       <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>
>>       <wsdl:operation name="SubmitOrdine">
>>          <soap:operation
>> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
>>          <wsdl:input>
>>             <soap:body use="literal"/>
>>          </wsdl:input>
>>          <wsdl:output>
>>             <soap:body use="literal"/>
>>          </wsdl:output>
>>       </wsdl:operation>
>>
>>       <wsdl:operation name="Notifica">
>>          <soap:operation />
>>          <wsdl:output>
>>             <soap:body use="literal"/>
>>          </wsdl:output>
>>       </wsdl:operation>
>>    </wsdl:binding>
>>
>>    <wsdl:service name="OrdineService">
>>       <wsdl:port name="OrdineInterfaceEndpoint"
>> binding="ord:OrdineInterfaceBinding">
>>          <soap:address location="http://localhost:8080/ese5/ordine"/>
>>        </wsdl:port>
>>    </wsdl:service>
>>
>>
>> </wsdl:definitions>
>>
>>
>>
>>
>> submitOrdine.xsd:
>>
>>
>>
>> <?xml version="1.0"?>
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>     targetNamespace="http://www.rivenditore.org/submitOrdineTypes"
>>     xmlns:so="http://www.rivenditore.org/submitOrdineTypes">
>>
>>      <xs:complexType name="ordineType">
>>         <xs:sequence maxOccurs="unbounded">
>>             <xs:element name="articolo" type="so:articoloType"/>
>>         </xs:sequence>
>>     </xs:complexType>
>>
>>     <xs:complexType name="articoloType">
>>         <xs:sequence>
>>             <xs:element name="codice" type="so:codiceType"/>
>>             <xs:element name="quantita" type="xs:positiveInteger"/>
>>         </xs:sequence>
>>     </xs:complexType>
>>
>>     <xs:simpleType name="codiceType">
>>         <xs:restriction base="xs:string">
>>             <xs:pattern value="[A-Z][A-Z][0-9]{4}"/>
>>         </xs:restriction>
>>     </xs:simpleType>
>>
>>     <xs:complexType name="esitoType">
>>         <xs:choice minOccurs="1" maxOccurs="1">
>>             <xs:choice>
>>                 <xs:element name="ok" type="so:okType"/>
>>                 <xs:element name="fail" type="xs:string"/>
>>             </xs:choice>
>>         </xs:choice>
>>     </xs:complexType>
>>
>>     <xs:complexType name="okType">
>>         <xs:sequence>
>>             <xs:element name="idOrdine" type="xs:positiveInteger"  />
>>             <xs:element name="totale" type="so:totaleType"  />
>>         </xs:sequence>
>>     </xs:complexType>
>>
>>     <xs:complexType name="totaleType">
>>         <xs:simpleContent>
>>             <xs:extension base="xs:decimal">
>>                 <xs:attribute name="valuta" type="xs:string" default="EUR"
>> use="optional"/>
>>             </xs:extension>
>>         </xs:simpleContent>
>>     </xs:complexType>
>>
>> </xs:schema>
>>
>>
>>
>>
>> I develope both client and server using wsdl2java.
>>
>> Thx for any help.
>>     
>
>
>