have a look at this too.. http://www.wso2.net/articles/axis2/java/2006/08/10/binary-with-adb
Thilina On 10/10/06, Thilina Gunarathne <[EMAIL PROTECTED]> wrote:
Please use MTOMDataBinding with base64Binary type... See here [1] ~Thilina [1] http://people.apache.org/~thilina/axis2/docs/mtom-guide.html#25 On 10/9/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: > Thilina, > Could this also be an issue because I am using the ADB data binding? > Is there any other data binding I need to use for MTOM? > > Thanks! > > > > IMO xs:anyType should work at this point... Please file a bug report for > > that... > > > > While above is also correct, you can define the return element by > > using the following complex type and it's the better way.. > > > > <xs:complexType> > > <xs:sequence> > > <xs:element name="image" type="xs:base64Binary" /> > > </xs:sequence> > > </xs:complexType> > > > > ~Thilina > > > > On 10/7/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: > >> Hi, > >> My replies are inline. > >> > >> > >> >> System.out.println("\n"); > >> >> omNode.serialize(System.out); > >> > Please let me know the output you get at this point... > >> > >> <image><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" > >> href="cid:1.urn:uuid:[EMAIL PROTECTED]" > >> /></image> > >> > >> > >> > > >> >> OMElement omNode2 = (OMElement) > >> omChildren.next(); > >> > if the deserialization is happening correctly you should get a > >> > ClassCastException at this point. > >> > >> No, I do not get a ClassCastException. I, in fact, get the exception > >> when > >> I try to cast it to OMText instead of OMElement. > >> > >> > > >> > Can you show us your WSDL... What is the data binding machanism your > >> > used,,, > >> I dit not use a specific data binding , just whatever the default is. > >> Here is the wsdl. I have a few other methods here, but the one I use for > >> MTOM is "getDiscrepancyReport". > >> > >> <wsdl:definitions xmlns:axis2="http://ws.apache.org/axis2" > >> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > >> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > >> xmlns:ns0="http://service.ws.ena.emprisa.com/xsd" > >> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" > >> xmlns:ns1="http://org.apache.axis2/xsd" > >> xmlns:xs="http://www.w3.org/2001/XMLSchema" > >> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > >> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > >> targetNamespace="http://ws.apache.org/axis2"><wsdl:documentation> > >> This is a device service. > >> </wsdl:documentation><wsdl:types><xs:schema > >> attributeFormDefault="qualified" elementFormDefault="qualified" > >> targetNamespace="http://service.ws.ena.emprisa.com/xsd"> > >> <xs:element name="getDevice"> > >> <xs:complexType> > >> <xs:sequence> > >> <xs:element name="deviceName" type="xs:string" /> > >> </xs:sequence> > >> </xs:complexType> > >> </xs:element> > >> <xs:element name="getDeviceResponse"> > >> <xs:complexType> > >> <xs:sequence> > >> <xs:element name="return" type="xs:anyType" /> > >> </xs:sequence> > >> </xs:complexType> > >> > >> </xs:element> > >> <xs:element name="getDiscrepancyReport"> > >> <xs:complexType> > >> <xs:sequence> > >> <xs:element name="devName" type="xs:string" /> > >> </xs:sequence> > >> </xs:complexType> > >> </xs:element> > >> <xs:element name="getDiscrepancyReportResponse"> > >> <xs:complexType> > >> <xs:sequence> > >> <xs:element name="return" type="xs:anyType" /> > >> </xs:sequence> > >> </xs:complexType> > >> </xs:element> > >> <xs:element name="getEnaCallbackResponse"> > >> <xs:complexType> > >> > >> <xs:sequence> > >> <xs:element name="return" type="xs:anyType" /> > >> </xs:sequence> > >> </xs:complexType> > >> </xs:element> > >> <xs:element name="listDevicesResponse"> > >> <xs:complexType> > >> <xs:sequence> > >> <xs:element name="return" type="xs:anyType" /> > >> </xs:sequence> > >> </xs:complexType> > >> </xs:element> > >> </xs:schema></wsdl:types><wsdl:message > >> name="getDiscrepancyReportMessage"><wsdl:part name="part1" > >> element="ns0:getDiscrepancyReport" /></wsdl:message><wsdl:message > >> name="getDiscrepancyReportResponse"><wsdl:part name="part1" > >> element="ns0:getDiscrepancyReportResponse" > >> /></wsdl:message><wsdl:message > >> name="getEnaCallbackMessage" /><wsdl:message > >> name="getEnaCallbackResponse"><wsdl:part name="part1" > >> element="ns0:getEnaCallbackResponse" /></wsdl:message><wsdl:message > >> name="listDevicesMessage" /><wsdl:message > >> name="listDevicesResponse"><wsdl:part name="part1" > >> element="ns0:listDevicesResponse" /></wsdl:message><wsdl:message > >> name="getDeviceMessage"><wsdl:part name="part1" element="ns0:getDevice" > >> /></wsdl:message><wsdl:message name="getDeviceResponse"><wsdl:part > >> name="part1" element="ns0:getDeviceResponse" > >> /></wsdl:message><wsdl:portType > >> name="DeviceServicePortType"><wsdl:operation > >> name="getDiscrepancyReport"><wsdl:input > >> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" > >> message="axis2:getDiscrepancyReportMessage" > >> wsaw:Action="urn:getDiscrepancyReport" /><wsdl:output > >> message="axis2:getDiscrepancyReportResponse" > >> /></wsdl:operation><wsdl:operation name="getEnaCallback"><wsdl:input > >> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" > >> message="axis2:getEnaCallbackMessage" wsaw:Action="urn:getEnaCallback" > >> /><wsdl:output message="axis2:getEnaCallbackResponse" > >> /></wsdl:operation><wsdl:operation name="listDevices"><wsdl:input > >> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" > >> message="axis2:listDevicesMessage" wsaw:Action="urn:listDevices" > >> /><wsdl:output message="axis2:listDevicesResponse" > >> /></wsdl:operation><wsdl:operation name="getDevice"><wsdl:input > >> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" > >> message="axis2:getDeviceMessage" wsaw:Action="urn:getDevice" > >> /><wsdl:output message="axis2:getDeviceResponse" > >> /></wsdl:operation></wsdl:portType><wsdl:binding > >> name="DeviceServiceSOAP11Binding" > >> type="axis2:DeviceServicePortType"><soap:binding > >> transport="http://schemas.xmlsoap.org/soap/http" style="document" > >> /><wsdl:operation name="getDiscrepancyReport"><soap:operation > >> soapAction="urn:getDiscrepancyReport" style="document" > >> /><wsdl:input><soap:body use="literal" > >> /></wsdl:input><wsdl:output><soap:body use="literal" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="getEnaCallback"><soap:operation soapAction="urn:getEnaCallback" > >> style="document" /><wsdl:input><soap:body use="literal" > >> /></wsdl:input><wsdl:output><soap:body use="literal" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="listDevices"><soap:operation soapAction="urn:listDevices" > >> style="document" /><wsdl:input><soap:body use="literal" > >> /></wsdl:input><wsdl:output><soap:body use="literal" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="getDevice"><soap:operation soapAction="urn:getDevice" > >> 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="DeviceServiceSOAP12Binding" > >> type="axis2:DeviceServicePortType"><soap12:binding > >> transport="http://schemas.xmlsoap.org/soap/http" style="document" > >> /><wsdl:operation name="getDiscrepancyReport"><soap12:operation > >> soapAction="urn:getDiscrepancyReport" style="document" > >> /><wsdl:input><soap12:body use="literal" > >> /></wsdl:input><wsdl:output><soap12:body use="literal" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="getEnaCallback"><soap12:operation soapAction="urn:getEnaCallback" > >> style="document" /><wsdl:input><soap12:body use="literal" > >> /></wsdl:input><wsdl:output><soap12:body use="literal" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="listDevices"><soap12:operation soapAction="urn:listDevices" > >> style="document" /><wsdl:input><soap12:body use="literal" > >> /></wsdl:input><wsdl:output><soap12:body use="literal" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="getDevice"><soap12:operation soapAction="urn:getDevice" > >> 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="DeviceServiceHttpBinding" > >> type="axis2:DeviceServicePortType"><http:binding verb="POST" > >> /><wsdl:operation name="getDiscrepancyReport"><http:operation > >> location="getDiscrepancyReport" /><wsdl:input><mime:content > >> type="text/xml" /></wsdl:input><wsdl:output><mime:content > >> type="text/xml" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="getEnaCallback"><http:operation location="getEnaCallback" > >> /><wsdl:input><mime:content type="text/xml" > >> /></wsdl:input><wsdl:output><mime:content type="text/xml" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="listDevices"><http:operation location="listDevices" > >> /><wsdl:input><mime:content type="text/xml" > >> /></wsdl:input><wsdl:output><mime:content type="text/xml" > >> /></wsdl:output></wsdl:operation><wsdl:operation > >> name="getDevice"><http:operation location="getDevice" > >> /><wsdl:input><mime:content type="text/xml" > >> /></wsdl:input><wsdl:output><mime:content type="text/xml" > >> /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service > >> name="DeviceService"><wsdl:port name="DeviceServiceSOAP11port_http" > >> binding="axis2:DeviceServiceSOAP11Binding"><soap:address > >> location="http://10.1.1.76:8080/enetaware/services/DeviceService" > >> /></wsdl:port><wsdl:port name="DeviceServiceSOAP11port_http1" > >> binding="axis2:DeviceServiceSOAP11Binding"><soap:address > >> location="http://10.1.1.76:8080/enetaware/rest/DeviceService" > >> /></wsdl:port><wsdl:port name="DeviceServiceSOAP12port_http" > >> binding="axis2:DeviceServiceSOAP12Binding"><soap12:address > >> location="http://10.1.1.76:8080/enetaware/services/DeviceService" > >> /></wsdl:port><wsdl:port name="DeviceServiceSOAP12port_http1" > >> binding="axis2:DeviceServiceSOAP12Binding"><soap12:address > >> location="http://10.1.1.76:8080/enetaware/rest/DeviceService" > >> /></wsdl:port><wsdl:port name="DeviceServiceHttpport" > >> binding="axis2:DeviceServiceHttpBinding"><http:address > >> location="http://10.1.1.76:8080/enetaware/rest/DeviceService" > >> /></wsdl:port><wsdl:port name="DeviceServiceHttpport1" > >> binding="axis2:DeviceServiceHttpBinding"><http:address > >> location="http://10.1.1.76:8080/enetaware/rest/DeviceService" > >> /></wsdl:port></wsdl:service></wsdl:definitions> > >> > >> > >> Thanks! > >> > >> > >> > >> > >> > > >> > ~Thilina > >> > > >> >> > >> >> > >> >> > Hi, > >> >> > > >> >> >> But when I traverse the "reportElement" there is only one child > >> >> element > >> >> >> i.e the "xop:Include" element. I can never get to the attachment > >> >> itself. > >> >> > This can't be... Axis2 should automatically detect XOP:include and > >> >> > should create an OMText instead of XOP:Include... > >> >> > > >> >> > If possible please post your message snapshots and the client > >> code... > >> >> > I would appreciate if you can do it soon, since we need to figure > >> out > >> >> > whether this is a bug prior to the release... > >> >> > > >> >> > Thanks, > >> >> > Thilina > >> >> > > >> >> >> How do I rertieve the binary data which is outside the soap > >> envelope? > >> >> >> Appreciate any help.. > >> >> >> > >> >> >> Thanks, > >> >> >> Sathija. > >> >> >> > >> >> >> > >> >> >> --------------------------------------------------------------------- > >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > -- > >> >> > http://webservices.apache.org/~thilina/ > >> >> > http://thilinag.blogspot.com/ > >> >> > > >> >> > --------------------------------------------------------------------- > >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> >> > > >> >> > > >> >> > >> >> > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> >> For additional commands, e-mail: [EMAIL PROTECTED] > >> >> > >> >> > >> > > >> > > >> > -- > >> > http://webservices.apache.org/~thilina/ > >> > http://thilinag.blogspot.com/ > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > > http://webservices.apache.org/~thilina/ > > http://thilinag.blogspot.com/ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/
-- http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
