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 Guo Tianchong <gu...@nec-as.nec.com.cn> on 2009/01/21 03:03:04 UTC

How to generate customer Java Class

hi, all

I know the request/response SOAP message

ex:
==>request SOAP body is:
<soap:Envelope ...>
  <soap:Body>
    <cwmp:Inform>
      <cwmp:DeviceId>
        <cwmp:Manufacturer>ABC</cwmp:Manufacturer>
        <cwmp:OUI>ABC</cwmp:OUI>
      </DeviceId>
      <cwmp:Event soapenc:arrayType="cwmp:EventStruct[2]">
        <cwmp:EventStruct>
          <cwmp:EventCode>0 BOOTSTRAP<cwmp:EventCode>
          <cwmp:CommandKey>0</cwmp:CommandKey>
        </cwmp:EventStruct>
        <cwmp:EventStruct>
          <cwmp:EventCode>1 BOOTSTRAP<cwmp:EventCode>
          <cwmp:CommandKey>1</cwmp:CommandKey>
        </cwmp:EventStruct>
      </cwmp:Event>
    </cwmp:Inform>
  </soap:Body>
</soap:Envelope>

==>response SOAP body is
<soap:Envelope ...>
  <soap:Body>
    <cwmp:InformResponse>
      <cwmp:MaxEvenlopes xsi:type="xsdUnsignedInt">1</cwmp:MaxEvenlopes>
    </cwmp:InformResponse>
  </soap:Body>
</soap:Envelope>

And I have the cwmp's xsd file.
Then, how to generate customer Java Class for my servce's opertion?

My Servce's opertion likes 
public ? inform(DeviceId device, EventStruct[] event) {...}

Thanks!

Guo







Re: How to generate customer Java Class

Posted by Kamal Chandana Mettananda <lk...@gmail.com>.
You need to use the wsdl file rather than the SOAP messages to generate
classes.


---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com


On Wed, Jan 21, 2009 at 7:33 AM, Guo Tianchong <gu...@nec-as.nec.com.cn>wrote:

> hi, all
>
> I know the request/response SOAP message
>
> ex:
> ==>request SOAP body is:
> <soap:Envelope ...>
>  <soap:Body>
>    <cwmp:Inform>
>      <cwmp:DeviceId>
>        <cwmp:Manufacturer>ABC</cwmp:Manufacturer>
>        <cwmp:OUI>ABC</cwmp:OUI>
>      </DeviceId>
>      <cwmp:Event soapenc:arrayType="cwmp:EventStruct[2]">
>        <cwmp:EventStruct>
>          <cwmp:EventCode>0 BOOTSTRAP<cwmp:EventCode>
>          <cwmp:CommandKey>0</cwmp:CommandKey>
>        </cwmp:EventStruct>
>        <cwmp:EventStruct>
>          <cwmp:EventCode>1 BOOTSTRAP<cwmp:EventCode>
>          <cwmp:CommandKey>1</cwmp:CommandKey>
>        </cwmp:EventStruct>
>      </cwmp:Event>
>    </cwmp:Inform>
>  </soap:Body>
> </soap:Envelope>
>
> ==>response SOAP body is
> <soap:Envelope ...>
>  <soap:Body>
>    <cwmp:InformResponse>
>      <cwmp:MaxEvenlopes xsi:type="xsdUnsignedInt">1</cwmp:MaxEvenlopes>
>    </cwmp:InformResponse>
>  </soap:Body>
> </soap:Envelope>
>
> And I have the cwmp's xsd file.
> Then, how to generate customer Java Class for my servce's opertion?
>
> My Servce's opertion likes
> public ? inform(DeviceId device, EventStruct[] event) {...}
>
> Thanks!
>
> Guo
>
>
>
>
>
>
>

Re: How to generate customer Java Class

Posted by Kamal Chandana Mettananda <lk...@gmail.com>.
I hope you know that WSDL is a file used to describe the web service. If
there is a web service deployed somewhere, you can access the wsld file from
that.

Do you have a running web service related to these SOAP messages?


---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com


On Wed, Jan 21, 2009 at 10:42 AM, Guo Tianchong <gu...@nec-as.nec.com.cn>wrote:

>  No, I haven't wsdl for my service now.
> Should I create a wsdl file?
>
> Guo
>
> ----- Original Message -----
> *From:* Amila Suriarachchi <am...@gmail.com>
> *To:* axis-user@ws.apache.org
> *Sent:* Wednesday, January 21, 2009 11:52 AM
> *Subject:* Re: How to generate customer Java Class
>
> Do you have the wsdl for your service?
>
> Amila.
>
> On Wed, Jan 21, 2009 at 7:33 AM, Guo Tianchong <gu...@nec-as.nec.com.cn>wrote:
>
>> hi, all
>>
>> I know the request/response SOAP message
>>
>> ex:
>> ==>request SOAP body is:
>> <soap:Envelope ...>
>>  <soap:Body>
>>    <cwmp:Inform>
>>      <cwmp:DeviceId>
>>        <cwmp:Manufacturer>ABC</cwmp:Manufacturer>
>>        <cwmp:OUI>ABC</cwmp:OUI>
>>      </DeviceId>
>>      <cwmp:Event soapenc:arrayType="cwmp:EventStruct[2]">
>>        <cwmp:EventStruct>
>>          <cwmp:EventCode>0 BOOTSTRAP<cwmp:EventCode>
>>          <cwmp:CommandKey>0</cwmp:CommandKey>
>>        </cwmp:EventStruct>
>>        <cwmp:EventStruct>
>>          <cwmp:EventCode>1 BOOTSTRAP<cwmp:EventCode>
>>          <cwmp:CommandKey>1</cwmp:CommandKey>
>>        </cwmp:EventStruct>
>>      </cwmp:Event>
>>    </cwmp:Inform>
>>  </soap:Body>
>> </soap:Envelope>
>>
>> ==>response SOAP body is
>> <soap:Envelope ...>
>>  <soap:Body>
>>    <cwmp:InformResponse>
>>      <cwmp:MaxEvenlopes xsi:type="xsdUnsignedInt">1</cwmp:MaxEvenlopes>
>>    </cwmp:InformResponse>
>>  </soap:Body>
>> </soap:Envelope>
>>
>> And I have the cwmp's xsd file.
>> Then, how to generate customer Java Class for my servce's opertion?
>>
>> My Servce's opertion likes
>> public ? inform(DeviceId device, EventStruct[] event) {...}
>>
>> Thanks!
>>
>> Guo
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>
>

Re: How to generate customer Java Class

Posted by Guo Tianchong <gu...@nec-as.nec.com.cn>.
No, I haven't wsdl for my service now.
Should I create a wsdl file?

Guo
  ----- Original Message ----- 
  From: Amila Suriarachchi 
  To: axis-user@ws.apache.org 
  Sent: Wednesday, January 21, 2009 11:52 AM
  Subject: Re: How to generate customer Java Class


  Do you have the wsdl for your service?

  Amila.


  On Wed, Jan 21, 2009 at 7:33 AM, Guo Tianchong <gu...@nec-as.nec.com.cn> wrote:

    hi, all

    I know the request/response SOAP message

    ex:
    ==>request SOAP body is:
    <soap:Envelope ...>
     <soap:Body>
       <cwmp:Inform>
         <cwmp:DeviceId>
           <cwmp:Manufacturer>ABC</cwmp:Manufacturer>
           <cwmp:OUI>ABC</cwmp:OUI>
         </DeviceId>
         <cwmp:Event soapenc:arrayType="cwmp:EventStruct[2]">
           <cwmp:EventStruct>
             <cwmp:EventCode>0 BOOTSTRAP<cwmp:EventCode>
             <cwmp:CommandKey>0</cwmp:CommandKey>
           </cwmp:EventStruct>
           <cwmp:EventStruct>
             <cwmp:EventCode>1 BOOTSTRAP<cwmp:EventCode>
             <cwmp:CommandKey>1</cwmp:CommandKey>
           </cwmp:EventStruct>
         </cwmp:Event>
       </cwmp:Inform>
     </soap:Body>
    </soap:Envelope>

    ==>response SOAP body is
    <soap:Envelope ...>
     <soap:Body>
       <cwmp:InformResponse>
         <cwmp:MaxEvenlopes xsi:type="xsdUnsignedInt">1</cwmp:MaxEvenlopes>
       </cwmp:InformResponse>
     </soap:Body>
    </soap:Envelope>

    And I have the cwmp's xsd file.
    Then, how to generate customer Java Class for my servce's opertion?

    My Servce's opertion likes
    public ? inform(DeviceId device, EventStruct[] event) {...}

    Thanks!

    Guo










  -- 
  Amila Suriarachchi
  WSO2 Inc.
  blog: http://amilachinthaka.blogspot.com/

Re: How to generate customer Java Class

Posted by Amila Suriarachchi <am...@gmail.com>.
Do you have the wsdl for your service?

Amila.

On Wed, Jan 21, 2009 at 7:33 AM, Guo Tianchong <gu...@nec-as.nec.com.cn>wrote:

> hi, all
>
> I know the request/response SOAP message
>
> ex:
> ==>request SOAP body is:
> <soap:Envelope ...>
>  <soap:Body>
>    <cwmp:Inform>
>      <cwmp:DeviceId>
>        <cwmp:Manufacturer>ABC</cwmp:Manufacturer>
>        <cwmp:OUI>ABC</cwmp:OUI>
>      </DeviceId>
>      <cwmp:Event soapenc:arrayType="cwmp:EventStruct[2]">
>        <cwmp:EventStruct>
>          <cwmp:EventCode>0 BOOTSTRAP<cwmp:EventCode>
>          <cwmp:CommandKey>0</cwmp:CommandKey>
>        </cwmp:EventStruct>
>        <cwmp:EventStruct>
>          <cwmp:EventCode>1 BOOTSTRAP<cwmp:EventCode>
>          <cwmp:CommandKey>1</cwmp:CommandKey>
>        </cwmp:EventStruct>
>      </cwmp:Event>
>    </cwmp:Inform>
>  </soap:Body>
> </soap:Envelope>
>
> ==>response SOAP body is
> <soap:Envelope ...>
>  <soap:Body>
>    <cwmp:InformResponse>
>      <cwmp:MaxEvenlopes xsi:type="xsdUnsignedInt">1</cwmp:MaxEvenlopes>
>    </cwmp:InformResponse>
>  </soap:Body>
> </soap:Envelope>
>
> And I have the cwmp's xsd file.
> Then, how to generate customer Java Class for my servce's opertion?
>
> My Servce's opertion likes
> public ? inform(DeviceId device, EventStruct[] event) {...}
>
> Thanks!
>
> Guo
>
>
>
>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/