tvDataDelivery.wsdl for Java

Discussion about Schedules Direct grabber code and data formats.

tvDataDelivery.wsdl for Java

Postby alex73 » Wed Oct 10, 2007 12:07 am

Hello, All !

I tryed to generate Java client classes by tvDataDelivery.wsdl, but it's not so simple.
Java 1.6 says: rpc/encoded wsdls are not supported in JAXWS 2.0
JAX-RPC from WSDP 2.0 says: unsupported schema type: "{urn:TMSWebServices}xtvdResponse"
Axis 2.0 says: Encoded use is not supported
Axis 1.4 says: Missing <soap:fault> element inFault "FaultName" in operation "FaultName", in binding acknowledge

How can I do it ?

WBR, Alex.





========= JDK 1.6 =========

c:\SD>wsimport -version
JAX-WS RI 2.0_02-b08-fcs

c:\SD>wsimport -d generated http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl
error: rpc/encoded wsdls are not supported in JAXWS 2.0.
========= JAX-RPC from WSDP 2.0 =========

c:\SD>cd C:\Java\jwsdp-2.0\jaxrpc\bin

C:\Java\jwsdp-2.0\jaxrpc\bin>call wscompile -version
JAX-RPC Standard Implementation (1.1.3, build R1)

C:\Java\jwsdp-2.0\jaxrpc\bin>type C:\SD\config.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl location="http://docs.tms.tribune.com/tech/tmsdatadirect/schedulesdirect/tvDataDelivery.wsdl" packageName="gr.test" />
</configuration>

C:\Java\jwsdp-2.0\jaxrpc\bin>call wscompile -gen:client C:\SD\config.xml
error: modeler error: unsupported schema type: "{urn:TMSWebServices}xtvdResponse"
========= Axis 2.0 =========

C:\Java\jwsdp-2.0\jaxrpc\bin>cd C:\Java\axis2-1.3\bin

C:\Java\axis2-1.3\bin>call wsdl2java -uri http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl
Using AXIS2_HOME: C:\Java\axis2-1.3
Using JAVA_HOME: C:\Java\jdk1.6.0_01
Retrieving schema at 'http://docs.tms.tribune.com/tech/xml/schemas/tmsxtvd.xsd', relative to 'http://docs.tms.tribune.com/tech/tmsdatadirect/schedulesdirect/'.
Retrieving schema at 'http://docs.tms.tribune.com/tech/xml/schemas/tmsxg.xsd', relative to 'http://docs.tms.tribune.com/tech/xml/schemas/tmsxtvd.xsd'.
[ERROR] Encoded use is not supported
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: Encoded use is not supported
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getPartsListFromSoapBody(WSDL11ToAxisServiceBuilder.java:1777)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaForPorttype(WSDL11ToAxisServiceBuilder.java:1528)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.generateWrapperSchema(WSDL11ToAxisServiceBuilder.java:1431)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:255)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:109)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:141)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
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: Encoded use is not supported
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:291)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:109)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:141)
... 2 more
Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: Encoded use is not supported
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getPartsListFromSoapBody(WSDL11ToAxisServiceBuilder.java:1777)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaForPorttype(WSDL11ToAxisServiceBuilder.java:1528)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.generateWrapperSchema(WSDL11ToAxisServiceBuilder.java:1431)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:255)
... 4 more

========= Axis 1.4 =========

C:\Java\axis2-1.3\bin>cd C:\Java\axis-1_4\lib

C:\Java\axis-1_4\lib>call java -cp axis.jar;activation-1.1.jar;mail-1.4.jar;commons-discovery-0.2.jar;commons-logging-1.0.4.jar;jaxrpc.jar;wsdl4j-1.5.1.jar org.apache.axis.wsdl.WSDL2Java http://docs.tms.tribune.com/tech/tmsdat ... ivery.wsdl
java.io.IOException: ERROR: Missing <soap:fault> element inFault "FaultName" in operation "FaultName", in binding acknowledge
at org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolTable.java:2858)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2549)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:744)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Unknown Source)
alex73
 
Posts: 2
Joined: Tue Oct 09, 2007 11:54 pm

Re: tvDataDelivery.wsdl for Java

Postby rshendershot » Fri Oct 12, 2007 6:16 am

I had to take out the Fault parts. I based my wsdl on edits for Visual Studio posted to another thread. You'll also have to set authentication into the context. I used xfire so import org.codehaus.xfire.client.Client and get its instance from the xtvdPortType service instance, and set the properties; Channel.USERNAME and Channel.PASSWORD before calling service.download()

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:TMSWebServices" name="xtvdWebService" xmlns:tms="urn:TMSWebServices"    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <wsdl:types>
      <xsd:schema targetNamespace="urn:TMSWebServices">
         <xsd:include schemaLocation="http://docs.tms.tribune.com/tech/xml/schemas/tmsxtvd.xsd" />
         <xsd:complexType name="xtvdResponse">
            <xsd:sequence>
               <xsd:element name="messages">
                  <xsd:annotation>
                     <xsd:documentation xml:lang="en">A collection of messages that may be sent back by the server to the client.  Messages are usually used by the server to notify the user of changes to their subscription caused by automatic changes in station's that are part of their subscription.  For instance, messages are passed back if a lineup selected by the user is no-longer valid, if all the stations selected by the user has been removed as they are no longer valid ... </xsd:documentation>
                  </xsd:annotation>
                  <xsd:complexType>
                     <xsd:sequence>
                        <xsd:element name="message" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
                           <xsd:annotation>
                              <xsd:documentation xml:lang="en">An individual message that is passed back by the server.</xsd:documentation>
                           </xsd:annotation>
                        </xsd:element>
                     </xsd:sequence>
                  </xsd:complexType>
               </xsd:element>
               <xsd:element ref="tms:xtvd"/>
            </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="downloadTimes">
            <xsd:sequence>
               <xsd:element name="blockedDownloadTime" type="tms:dateTime" minOccurs="0">
                  <xsd:annotation>
                     <xsd:documentation xml:lang="en">The time (in UTC) until which download requests will be blocked by the webservice.</xsd:documentation>
                  </xsd:annotation>
               </xsd:element>
               <xsd:element name="suggestedDownloadTime" type="tms:dateTime">
                  <xsd:annotation>
                     <xsd:documentation xml:lang="en">The time (in UTC) at which the webservice recommends that the client attempt another download request.</xsd:documentation>
                  </xsd:annotation>
               </xsd:element>
            </xsd:sequence>
         </xsd:complexType>
      </xsd:schema>
   </wsdl:types>
   <wsdl:message name="downloadResponse">
      <wsdl:part name="xtvdResponse" type="tms:xtvdResponse"/>
   </wsdl:message>
   <wsdl:message name="downloadRequest">
      <wsdl:part name="startTime" type="tms:dateTime"/>
      <wsdl:part name="endTime" type="tms:dateTime"/>
   </wsdl:message>
   <wsdl:message name="acknowledgeResponse">
      <wsdl:part name="downloadTimes" type="tms:downloadTimes"/>
   </wsdl:message>
   <wsdl:message name="voidMessage">
      <wsdl:documentation>A general success message to indicate a successful transaction.  In general failures will result in SOAP Faults.</wsdl:documentation>
   </wsdl:message>
   <wsdl:portType name="xtvdPortType">
      <wsdl:operation name="download">
         <wsdl:input message="tms:downloadRequest"/>
         <wsdl:output message="tms:downloadResponse"/>
      </wsdl:operation>
      <wsdl:operation name="acknowledge">
         <wsdl:input message="tms:voidMessage"/>
         <wsdl:output message="tms:acknowledgeResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="xtvdBinding" type="tms:xtvdPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="download">
         <soap:operation soapAction="urn:TMSWebServices:xtvdWebService#download" style="rpc"/>
         <wsdl:input>
            <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TMSWebServices"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TMSWebServices"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="acknowledge">
         <soap:operation soapAction="urn:TMSWebServices:xtvdWebService#acknowledge" style="rpc"/>
         <wsdl:input>
            <soap:body use="literal" namespace="urn:TMSWebServices"/>
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal" namespace="urn:TMSWebServices"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="xtvdWebService">
      <wsdl:port name="xtvdWebServicePort" binding="tms:xtvdBinding">
         <soap:address location="http://webservices.schedulesdirect.tmsdatadirect.com/schedulesdirect/tvlistings/xtvdService"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>
rshendershot
 
Posts: 51
Joined: Fri Aug 17, 2007 6:19 am

Re: tvDataDelivery.wsdl for Java

Postby the_tom » Fri Oct 12, 2007 7:21 am

Also see this thread: viewtopic.php?f=8&t=335
the_tom
 
Posts: 15
Joined: Mon Sep 10, 2007 4:19 pm


Return to Developers Corner

Who is online

Users browsing this forum: No registered users and 4 guests

cron