axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1467) Serialisation errors in .NET client with Axis 1.2 rpc/enc service
Date Tue, 20 Jul 2004 20:13:39 GMT
The following comment has been added to this issue:

     Author: Anand Natrajan
    Created: Tue, 20 Jul 2004 1:13 PM
       Body:
Actually, as a separate task, I already generate wrapped/literal versions of some of my service
- the descriptors for those are already in the server-config.wsdd I uploaded.

With those, I have a completely different problem. There, I can't even get my VB .NET client
to compile because I have methods that take/send byte[]. In rpc/enc, those get converted to
WSDL's base64Binary and everything is copacetic. In wrap/lit, those get converted to sequence
of WSDL's byte, which work just fine for Java clients. However, .NET clients want to treat
WSDL's byte as 7-bit signed small integer - go figure. If I tinker with the WSDL to make those
WSDL bytes WSDL unsignedBytes, then .NET is happy, but Java clients are not. Sigh.

It'll take me a little time, but perhaps by tomorrow I can comment out all the extraneous
problems above and get a VB .NET client that tests the same whoami method we're talking about
here. I'll paste the Axis response and the .NET client's progress as a further comment.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1467?page=comments#action_36793

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1467

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1467
    Summary: Serialisation errors in .NET client with Axis 1.2 rpc/enc service
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             1.2 Beta

   Assignee: 
   Reporter: Anand Natrajan

    Created: Tue, 20 Jul 2004 8:37 AM
    Updated: Tue, 20 Jul 2004 1:13 PM
Environment: VB .NET client on Win2000, Axis 1.2beta2 server inside JBoss/Jetty on Solaris.

Description:
I'm seeing some client-side serialisation errors when I try to access
my Axis 1.2 rpc/encoded service using a VB .NET client. This same
combination worked in Axis 1.1, but fails with Axis 1.2. I have used
the Axis 1.2 beta from June 14th as well as July 15th separately.

Below is a complete trace of what I did and what the error is.
I've shown
- the signature of the Java service
- the java2wsdl Ant task used to generate the WSDL
- the wsdl2java Ant task used to generate deploy.wsdd
- the VB .NET client
- the SOAP request generated by the .NET client
- the SOAP response when the service was deployed under Axis 1.1
- the SOAP response when the service was deployed under Axis 1.2
The items shown as ellipses have been elided because they're simply
values irrelevant to the operation.

The only difference between the two scenarios (1.1 vs. 1.2) is that
I changed the Axis libraries (axis*.jar, commons*.jar, saaj.jar,
wsdl4j.jar, jaxrpc.jar) and re-ran the procedure right from compiling
the service and running java2wsdl and so on.

What has changed between Axis 1.1 and 1.2 in this respect?

<!-- Java signature of service -->
import com.abc.api.common.MyPrincipal;
public class MyAPIRpcEnc
{
    public String[] whoami(MyPrincipal principal)
        throws RemoteException
	{
		...
	}
}

<!-- java2wsdl task -->
        <axis-java2wsdl
            classname="com.abc.ws.server.MyAPIRpcEnc"
            style="rpc"
            use="encoded"
            namespace="urn:${apiName}"
			location="http://LOCAL_HOST:8080/axis/services/MyAPIRpcEnc"
			output="${basedir}/${wsdl.build.dir}/MyAPIRpcEnc.wsdl">
            <classpath refid="classpath"/>
            <mapping package="com.abc.api.common"
                namespace="urn:MyAPICommon"/>
		</axis-java2wsdl>

<!-- wsdl2java task -->
        <axis-wsdl2java
            output="${outDir}"
            url="${basedir}/${wsdl.build.dir}/MyAPIRpcEnc.wsdl"
            serverside="true">
            <mapping namespace="urn:MyAPIRpcEnc"
                package="com.abc.ws.stubs"/>
            <mapping namespace="urn:MyAPICommon"
                package="com.abc.api.common"/>
        </axis-wsdl2java>
        <!-- Paste deploy.wsdd into server-config.wsdd -->


<!-- VB .NET client call -->
...
Private Sub actualTests()
	Dim principal As New MyAPIRpcEnc.MyPrincipal
	principal.name = "Administrator"
	principal.password = "Administrator"
	principal.authService = "DefaultAuthService"
	principal.authServiceType = "Grid"
	principal.domain = "mydomain.abc.com"
	Dim asdn As New MyAPIRpcEnc.MyAPIRpcEncService
	asdn.whoami(principal)
End Sub
...

<!-- VB .NET request -->
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:tns="urn:MyAPIRpcEnc"
	xmlns:types="urn:MyAPIRpcEnc/encodedTypes"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
		<tns:whoami>
			<principal href="#id1" />
		</tns:whoami>
		<q1:MyPrincipal id="id1"
			xsi:type="q1:MyPrincipal"
			xmlns:q1="urn:MyAPICommon">
			<authService xsi:type="xsd:string">DefaultAuthService</authService>
			<authServiceType xsi:type="xsd:string">Grid</authServiceType>
			<domain xsi:type="xsd:string">mydomain.abc.com</domain>
			<name xsi:type="xsd:string">Administrator</name>
			<password xsi:type="xsd:string">Administrator</password>
		</q1:MyPrincipal>
	</soap:Body>
</soap:Envelope>

<!-- Axis 1.1 response -->
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<soapenv:Body>
		<ns1:whoamiResponse
			soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
			xmlns:ns1="urn:MyAPIRpcEnc">
			<whoamiReturn soapenc:arrayType="xsd:string[9]"
				xsi:type="soapenc:Array"
				xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
				<item>...</item>
				<item>...</item>
				<item>...</item>
				<item>...</item>
				<item>...</item>
				<item>...</item>
				<item>...</item>
				<item>...</item>
				<item>...</item>
			</whoamiReturn>
		</ns1:whoamiResponse>
	</soapenv:Body>
</soapenv:Envelope>

<!-- Axis 1.2 beta response (June 14th and July 15th releases) -->
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<soapenv:Body>
		<ns1:whoamiResponse
			soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
			xmlns:ns1="urn:MyAPIRpcEnc">
			<whoamiReturn soapenc:arrayType="soapenc:string[9]"
				xsi:type="ns1:ArrayOf_xsd_string"
				xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
				<item xsi:type="soapenc:string">...</item>
			</whoamiReturn>
		</ns1:whoamiResponse>
	</soapenv:Body>
</soapenv:Envelope>

<!-- VB .NET error -->
Unhandled Exception: System.InvalidOperationException: There is an error in XML
document (1, 308). ---> System.InvalidOperationException: The specified type was
 not recognized: name='string', namespace='http://schemas.xmlsoap.org/soap/encoding/', at
<whoamiReturn xmlns=''>.
   at System.Xml.Serialization.XmlSerializationReader.GetPrimitiveType(XmlQualifiedName typeName,
Boolean throwOnUnknown)
   at System.Xml.Serialization.XmlSerializationReader.ReadArray(String typeName, String typeNs)
   at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String name,
String ns, Boolean elementCanBeType, String& fixupReference)
   at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String name,
String ns, String& fixupReference)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read70_whoamiResponse()
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[]
parameters)
   at DotNetWSAPITest.MyAPIRpcEnc.MyAPIRpcEncService.whoami(MyPrincipal principal)
   at DotNetWSAPITest.DotNetWSAPITest.actualTests(MyPrincipal principal)
   at DotNetWSAPITest.DotNetWSAPITest.testMyWSAPI()
   at DotNetWSAPITest.DotNetWSAPITest.Main()


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message