axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "laurent (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-4343) Handle org.w3c.dom.Document in parameters
Date Mon, 11 May 2009 15:59:45 GMT
Handle org.w3c.dom.Document in parameters
-----------------------------------------

                 Key: AXIS2-4343
                 URL: https://issues.apache.org/jira/browse/AXIS2-4343
             Project: Axis 2.0 (Axis2)
          Issue Type: Wish
    Affects Versions: 1.4.1
         Environment: WinXP
            Reporter: laurent


Hi all,

Here is a simple java program 
package c;
import org.w3c.dom.Document;

public class b{

public b(){
}

public Document testB(Document xml){
return xml;
}


}
AAR deployment was OK
I'm trying to interrogate the web service
http://localhost:8080/axis2/b/testB?xml=...
Here the exception I'm getting in my tomcat logs
...
[ERROR] org.w3c.dom.Document
org.apache.axis2.AxisFault: org.w3c.dom.Document
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.engine.DefaultObjectSupplier.getObject(DefaultObjectSupplier.java:30)
at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:410)
at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:722)
at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:670)...
Caused by: java.lang.InstantiationException: org.w3c.dom.Document
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
...



WSDL generated by AXIS2
<?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd"
xmlns:ns="http://c" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ax21="http://dom.w3c.org/xsd" xmlnss="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
targetNamespace="http://c">
<wsdl:documentation>b</wsdl:documentation> 
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://dom.w3c.org/xsd">
- <xs:complexType name="Document">
- <xs:sequence>
<xs:element minOccurs="0" name="doctype" nillable="true" type="ax21ocumentType" /> 
<xs:element minOccurs="0" name="documentElement" nillable="true" type="ax21:Element" />

<xs:element minOccurs="0" name="documentURI" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="domConfig" nillable="true" type="ax21OMConfiguration" />

<xs:element minOccurs="0" name="implementation" nillable="true" type="ax21OMImplementation"
/> 
<xs:element minOccurs="0" name="inputEncoding" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="strictErrorChecking" type="xs:boolean" /> 
<xs:element minOccurs="0" name="xmlEncoding" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="xmlStandalone" type="xs:boolean" /> 
<xs:element minOccurs="0" name="xmlVersion" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="DocumentType">
- <xs:sequence>
<xs:element minOccurs="0" name="entities" nillable="true" type="ax21:NamedNodeMap" />

<xs:element minOccurs="0" name="internalSubset" nillable="true" type="xs:string" />

<xs:element minOccurs="0" name="name" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="notations" nillable="true" type="ax21:NamedNodeMap" />

<xs:element minOccurs="0" name="publicId" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="systemId" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NamedNodeMap">
- <xs:sequence>
<xs:element minOccurs="0" name="length" type="xs:int" /> 
<xs:element minOccurs="0" name="namedItem" nillable="true" type="ax21:Node" /> 
<xs:element minOccurs="0" name="namedItemNS" nillable="true" type="ax21:Node" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Node">
- <xs:sequence>
<xs:element minOccurs="0" name="attributes" nillable="true" type="ax21:NamedNodeMap" />

<xs:element minOccurs="0" name="baseURI" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="childNodes" nillable="true" type="ax21:NodeList" />

<xs:element minOccurs="0" name="firstChild" nillable="true" type="ax21:Node" /> 
<xs:element minOccurs="0" name="lastChild" nillable="true" type="ax21:Node" /> 
<xs:element minOccurs="0" name="localName" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="namespaceURI" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="nextSibling" nillable="true" type="ax21:Node" /> 
<xs:element minOccurs="0" name="nodeName" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="nodeType" type="xs:short" /> 
<xs:element minOccurs="0" name="nodeValue" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="ownerDocument" nillable="true" type="ax21ocument" />

<xs:element minOccurs="0" name="parentNode" nillable="true" type="ax21:Node" /> 
<xs:element minOccurs="0" name="prefix" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="previousSibling" nillable="true" type="ax21:Node" />

<xs:element minOccurs="0" name="textContent" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NodeList">
- <xs:sequence>
<xs:element minOccurs="0" name="length" type="xs:int" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Element">
- <xs:sequence>
<xs:element minOccurs="0" name="attributeNode" nillable="true" type="ax21:Attr" /> 
<xs:element minOccurs="0" name="attributeNodeNS" nillable="true" type="ax21:Attr" />

<xs:element minOccurs="0" name="schemaTypeInfo" nillable="true" type="ax21:TypeInfo" />

<xs:element minOccurs="0" name="tagName" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Attr">
- <xs:sequence>
<xs:element minOccurs="0" name="id" type="xs:boolean" /> 
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="ownerElement" nillable="true" type="ax21:Element" />

<xs:element minOccurs="0" name="schemaTypeInfo" nillable="true" type="ax21:TypeInfo" />

<xs:element minOccurs="0" name="specified" type="xs:boolean" /> 
<xs:element minOccurs="0" name="value" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="TypeInfo">
- <xs:sequence>
<xs:element minOccurs="0" name="typeName" nillable="true" type="xs:string" /> 
<xs:element minOccurs="0" name="typeNamespace" nillable="true" type="xs:string" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="DOMConfiguration">
- <xs:sequence>
<xs:element minOccurs="0" name="parameterNames" nillable="true" type="ax21OMStringList"
/> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="DOMStringList">
- <xs:sequence>
<xs:element minOccurs="0" name="length" type="xs:int" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="DOMImplementation">
<xs:sequence /> 
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax22="http://dom.w3c.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://c">
<xs:import namespace="http://dom.w3c.org/xsd" /> 
- <xs:element name="testB">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="xml" nillable="true" type="ax22ocument" /> 
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="testBResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ax22ocument" /> 
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
- <wsdl:message name="testBRequest">
<wsdl:part name="parameters" element="ns:testB" /> 
</wsdl:message>
- <wsdl:message name="testBResponse">
<wsdl:part name="parameters" element="ns:testBResponse" /> 
</wsdl:message>
<wsdl:message name="readRequest" /> 
<wsdl:message name="readResponse" /> 
- <wsdl:portType name="bPortType">
- <wsdl:operation name="testB">
<wsdl:input message="ns:testBRequest" wsaw:Action="urn:testB" /> 
<wsdl:output message="ns:testBResponse" wsaw:Action="urn:testBResponse" /> 
</wsdl:operation>
- <wsdl:operation name="read">
<wsdl:input message="ns:readRequest" wsaw:Action="urn:read" /> 
<wsdl:output message="ns:readResponse" wsaw:Action="urn:readResponse" /> 
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="bSoap11Binding" type="ns:bPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> 
- <wsdl:operation name="testB">
<soap:operation soapAction="urn:testB" style="document" /> 
- <wsdl:input>
<soap:body use="literal" /> 
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" /> 
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="read">
<soap:operation soapAction="urn:read" 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="bSoap12Binding" type="ns:bPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />

- <wsdl:operation name="testB">
<soap12:operation soapAction="urn:testB" style="document" /> 
- <wsdl:input>
<soap12:body use="literal" /> 
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" /> 
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="read">
<soap12:operation soapAction="urn:read" 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="bHttpBinding" type="ns:bPortType">
<http:binding verb="POST" /> 
- <wsdl:operation name="testB">
<http:operation location="b/testB" /> 
- <wsdl:input>
<mime:content type="text/xml" part="testB" /> 
</wsdl:input>
- <wsdl:output>
<mime:content type="text/xml" part="testB" /> 
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="read">
<http:operation location="b/read" /> 
- <wsdl:input>
<mime:content type="text/xml" part="read" /> 
</wsdl:input>
- <wsdl:output>
<mime:content type="text/xml" part="read" /> 
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="b">
- <wsdl:port name="bHttpSoap11Endpoint" binding="ns:bSoap11Binding">
<soap:address location="http://10.3.51.62:8080/wssab/services/b.bHttpSoap11Endpoint/" />

</wsdl:port>
- <wsdl:port name="bHttpSoap12Endpoint" binding="ns:bSoap12Binding">
<soap12:address location="http://10.3.51.62:8080/wssab/services/b.bHttpSoap12Endpoint/"
/> 
</wsdl:port>
- <wsdl:port name="bHttpEndpoint" binding="ns:bHttpBinding">
<http:address location="http://10.3.51.62:8080/wssab/services/b.bHttpEndpoint/" /> 
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

I've manage to handle xml document with AXIS1.4 but I didn't manage to migrate to AXIS2.0
because of this problem.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message