SwA is different from MTOM. I don't know of CXF does SwA. On Fri, Apr 4, 2008 at 11:07 AM, Vijay Allam < [EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> 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. > >>> > >> > >> > >> > > > >