You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Cory Wilkerson <cw...@travelnow.com> on 2003/01/20 18:23:34 UTC

Document Style Service

All,

Could someone comment as to just what my WSDD file may look like if I've implented a document style service that looks like the following?  I'm specifically curious as to how I describe the "someInstance" parameter to the method "method" -- and, will the WSDL generated from this source basically tell the client "Build an XML message with root name "SomeInstance" containing child "age" that is of type xsd:int, etc?

I'm really needing to get this squared away and it seems as if the Axis User Guide just kinda neglects this point -- is there an example in the samples?

Thanks!
Cory

-----------------------------------------------------
package com.somepackage;

public class MyService() {

     public void method(SomeInstance someInstance) {

     }
}
------------------------------------------------------
package com.somepackage;

public class SomeInstance() {

    private int age = 0;

    public SomeInstance() {
	
    }

    public void setAge(int age) {
        this.age = age;
    }
}
-------------------------------------------------------
WSDD for document style service

<deployment xmlns="http://xml.apache.org/axis/wsdd/" 
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

    <service name="SomeService" provider="java:RPC">
       <parameter name="className" value="com.somepackage.SomeInstance"/>
       <parameter name="allowedMethods" value="method"/>
    </service>
</deployment>

-------------------------------------------------------

Re: Document Style Service

Posted by Rolando Pablos Sánchez <rp...@tid.es>.
You can create your wsdd from the wsdl. And you can obtain this one from the
Java class with Java2WSDL. But you must modify the wsdl to declare the
document style and literal enconding. I show you the lines:
[...]
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
[...]
<wsdlsoap:body namespace="urn" use="literal"/>

If you use RPC, you get in line the method name and the params. If you use
the document style the root element is just the element specified in the
message part in the wsdl file. Normally it is complex type. So this
structure name is like the operation name and the children the param data.


I am not sure of understanding your case. If you want a method with a int
like a param just use the interface: method(int i).


----- Original Message -----
From: "Cory Wilkerson" <cw...@travelnow.com>
To: <ax...@xml.apache.org>
Cc: "Brian Speight" <bs...@travelnow.com>
Sent: Monday, January 20, 2003 6:23 PM
Subject: Document Style Service


All,

Could someone comment as to just what my WSDD file may look like if I've
implented a document style service that looks like the following?  I'm
specifically curious as to how I describe the "someInstance" parameter to
the method "method" -- and, will the WSDL generated from this source
basically tell the client "Build an XML message with root name
"SomeInstance" containing child "age" that is of type xsd:int, etc?

I'm really needing to get this squared away and it seems as if the Axis User
Guide just kinda neglects this point -- is there an example in the samples?

Thanks!
Cory

-----------------------------------------------------
package com.somepackage;

public class MyService() {

     public void method(SomeInstance someInstance) {

     }
}
------------------------------------------------------
package com.somepackage;

public class SomeInstance() {

    private int age = 0;

    public SomeInstance() {

    }

    public void setAge(int age) {
        this.age = age;
    }
}
-------------------------------------------------------
WSDD for document style service

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

    <service name="SomeService" provider="java:RPC">
       <parameter name="className" value="com.somepackage.SomeInstance"/>
       <parameter name="allowedMethods" value="method"/>
    </service>
</deployment>

-------------------------------------------------------