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 René Möhring <re...@gmx.de> on 2012/03/21 09:26:45 UTC

Problems with generating code from Onvif wsdl

Hello,

I am trying to generate C code from the Onvif wsdl. Onvif is a standard 
for finding and managing IP cameras via web services. Therefore the wsdl 
cannot contain a service. The cameras themselves provide the actual 
services. How do I generate code from such a file?

My approach:

./wsdl2java.sh -l c -uri 
http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl
  Using AXIS2_HOME: /home/moehring/axis2
  Using JAVA_HOME:  /opt/java
Retrieving document at 
'http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl'.
Retrieving schema at '../../../ver10/schema/onvif.xsd', relative to 
'http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl'.
Retrieving schema at 'http://www.w3.org/2005/05/xmlmime', relative to 
'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
Retrieving schema at 'http://docs.oasis-open.org/wsn/b-2.xsd', relative 
to 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
Retrieving schema at 'http://docs.oasis-open.org/wsn/t-1.xsd', relative 
to 'http://docs.oasis-open.org/wsn/b-2.xsd'.
Retrieving schema at 'http://docs.oasis-open.org/wsrf/bf-2.xsd', 
relative to 'http://docs.oasis-open.org/wsn/b-2.xsd'.
Retrieving schema at 'http://www.w3.org/2005/08/addressing/ws-addr.xsd', 
relative to 'http://docs.oasis-open.org/wsrf/bf-2.xsd'.
Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 
'http://docs.oasis-open.org/wsrf/bf-2.xsd'.
Retrieving schema at 'http://www.w3.org/2005/08/addressing/ws-addr.xsd', 
relative to 'http://docs.oasis-open.org/wsn/b-2.xsd'.
Retrieving schema at 'http://www.w3.org/2004/08/xop/include', relative 
to 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
         at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:175)
         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: No services found in the WSDL at 
http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl with 
targetnamespace http://www.onvif.org/ver10/device/wsdl
         at 
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:115)
         at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:169)
         ... 2 more

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Problems with generating code from Onvif wsdl

Posted by René Möhring <re...@gmx.de>.
Am 27.03.2012 09:57, schrieb Sagara Gunathunga:
> You can't generate codes for incomplete WSDL file ( missing service,
> port etc). Service provider should provide valid WSDL file for code
> generation.
>
> Thanks !
This is impossible. As I wrote the service is provided by the cameras. 
You cant have a separate wsdl for every camera. And gSoap is able to 
generate code from the Onvif-wsdl. So it is very well possible. I just 
dont like its license.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Problems with generating code from Onvif wsdl

Posted by Sagara Gunathunga <sa...@gmail.com>.
You can't generate codes for incomplete WSDL file ( missing service,
port etc). Service provider should provide valid WSDL file for code
generation.

Thanks !

On Tue, Mar 27, 2012 at 1:18 PM, René Möhring <re...@gmx.de> wrote:
> Am 21.03.2012 09:26, schrieb René Möhring:
>
>> Hello,
>>
>> I am trying to generate C code from the Onvif wsdl. Onvif is a standard
>> for finding and managing IP cameras via web services. Therefore the wsdl
>> cannot contain a service. The cameras themselves provide the actual
>> services. How do I generate code from such a file?
>>
>> My approach:
>>
>> ./wsdl2java.sh -l c -uri
>> http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl
>>  Using AXIS2_HOME: /home/moehring/axis2
>>  Using JAVA_HOME:  /opt/java
>> Retrieving document at
>> 'http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl'.
>> Retrieving schema at '../../../ver10/schema/onvif.xsd', relative to
>> 'http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl'.
>> Retrieving schema at 'http://www.w3.org/2005/05/xmlmime', relative to
>> 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
>> Retrieving schema at 'http://docs.oasis-open.org/wsn/b-2.xsd', relative to
>> 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
>> Retrieving schema at 'http://docs.oasis-open.org/wsn/t-1.xsd', relative to
>> 'http://docs.oasis-open.org/wsn/b-2.xsd'.
>> Retrieving schema at 'http://docs.oasis-open.org/wsrf/bf-2.xsd', relative
>> to 'http://docs.oasis-open.org/wsn/b-2.xsd'.
>> Retrieving schema at 'http://www.w3.org/2005/08/addressing/ws-addr.xsd',
>> relative to 'http://docs.oasis-open.org/wsrf/bf-2.xsd'.
>> Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to
>> 'http://docs.oasis-open.org/wsrf/bf-2.xsd'.
>> Retrieving schema at 'http://www.w3.org/2005/08/addressing/ws-addr.xsd',
>> relative to 'http://docs.oasis-open.org/wsn/b-2.xsd'.
>> Retrieving schema at 'http://www.w3.org/2004/08/xop/include', relative to
>> 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
>> Exception in thread "main"
>> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>>        at
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:175)
>>        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>>        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>> Caused by: org.apache.axis2.AxisFault: No services found in the WSDL at
>> http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl with
>> targetnamespace http://www.onvif.org/ver10/device/wsdl
>>        at
>> org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:115)
>>        at
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:169)
>>        ... 2 more
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
> Really nobody any idea?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>



-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Problems with generating code from Onvif wsdl

Posted by René Möhring <re...@gmx.de>.
Am 21.03.2012 09:26, schrieb René Möhring:
> Hello,
>
> I am trying to generate C code from the Onvif wsdl. Onvif is a 
> standard for finding and managing IP cameras via web services. 
> Therefore the wsdl cannot contain a service. The cameras themselves 
> provide the actual services. How do I generate code from such a file?
>
> My approach:
>
> ./wsdl2java.sh -l c -uri 
> http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl
>  Using AXIS2_HOME: /home/moehring/axis2
>  Using JAVA_HOME:  /opt/java
> Retrieving document at 
> 'http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl'.
> Retrieving schema at '../../../ver10/schema/onvif.xsd', relative to 
> 'http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl'.
> Retrieving schema at 'http://www.w3.org/2005/05/xmlmime', relative to 
> 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
> Retrieving schema at 'http://docs.oasis-open.org/wsn/b-2.xsd', 
> relative to 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
> Retrieving schema at 'http://docs.oasis-open.org/wsn/t-1.xsd', 
> relative to 'http://docs.oasis-open.org/wsn/b-2.xsd'.
> Retrieving schema at 'http://docs.oasis-open.org/wsrf/bf-2.xsd', 
> relative to 'http://docs.oasis-open.org/wsn/b-2.xsd'.
> Retrieving schema at 
> 'http://www.w3.org/2005/08/addressing/ws-addr.xsd', relative to 
> 'http://docs.oasis-open.org/wsrf/bf-2.xsd'.
> Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 
> 'http://docs.oasis-open.org/wsrf/bf-2.xsd'.
> Retrieving schema at 
> 'http://www.w3.org/2005/08/addressing/ws-addr.xsd', relative to 
> 'http://docs.oasis-open.org/wsn/b-2.xsd'.
> Retrieving schema at 'http://www.w3.org/2004/08/xop/include', relative 
> to 'http://www.onvif.org/onvif/ver10/schema/onvif.xsd'.
> Exception in thread "main" 
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:175)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: org.apache.axis2.AxisFault: No services found in the WSDL 
> at http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl with 
> targetnamespace http://www.onvif.org/ver10/device/wsdl
>         at 
> org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:115)
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:169)
>         ... 2 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
Really nobody any idea?

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org