Xrpcc: Generate stub from WSDL
Hi,
I created a JAX-RPC based web services and used xrpcc tool to generate the server-side classes and wsdl file. And then deployed them on tomcat successfully.
To access the web service, the remote client needs to get the wsdl document (in this case, i used the one generated by the xrpcc tool on the service side) and generate the client-side stub and other classes.
However, i got an error message when trying to generate the stub:
error: modeler error: invalid entity name: "PriceQuote" (in namespace: "http://www.w3.org/2001/XMLSchema")
The wsdl document looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="TestService" targetNamespace="http://www.deitel.com/test.wsdl" xmlns:tns="http://www.deitel.com/test.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<message name="getPrice">
<part name="String_1" type="xsd:string"/></message>
<message name="getPriceResponse">
<part name="result" type="xsd:PriceQuote"/></message>
<portType name="Test">
<operation name="getPrice">
<input message="tns:getPrice"/>
<output message="tns:getPriceResponse"/></operation></portType>
<binding name="TestBinding" type="tns:Test">
<operation name="getPrice">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://www.deitel.com/test.wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://www.deitel.com/test.wsdl"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="TestService">
<port name="TestPort" binding="tns:TestBinding">
<soap:address location="http://zhang:8080/jaxrpc-test/test/endpoint/Test"/></port></service></definitions>
I noticed that the error is caused by PriceQuote data type. Then I added PriceQuote data type definition to the wsdl file.
<types>
<xsd:schema
targetNamespace="http://www.deitel.com/schema"
xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="PriceQuote">
<xsd:sequence>
<xsd:element name="price" type="xsd:double"/>
<xsd:element name="ISBN" type="xsd:string"/>
<xsd:element name="storeID" type="xsd:int"/>
<xsd:element name="storeDescription" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="getPrice">
<part name="String_1" type="xsd:string"/></message>
<message name="getPriceResponse">
<part name="result" type="xsd1:PriceQuote"/></message>
The xrpcc tool then can generate the client-side stub and classes without any problems. However, when the client is executed, I got the following error message:
java.rmi.RemoteException: deserialization error: deserialization error: deserial
ization error: deserialization error: unexpected element type: expected={http://
www.deitel.com/schema}PriceQuote, actual={http://www.w3.org/2001/XMLSchema}Price
Quote; nested exception is:
deserialization error: deserialization error: deserialization error: des
erialization error: unexpected element type: expected={http://www.deitel.com/sch
ema}PriceQuote, actual={http://www.w3.org/2001/XMLSchema}PriceQuote
deserialization error: deserialization error: deserialization error: deserialization error: unexpected element type: expected={http://www.deitel.com/schema}PriceQuote, actual={http://www.w3.org/2001/XMLSchema}PriceQuote
at com.sun.xml.rpc.encoding.SOAPDeserializationContext.deserializeMultiR
efObjects(SOAPDeserializationContext.java:107)
at com.sun.xml.rpc.client.StreamingSender._sendStreamingSender.java:159)
at test.TestPort_Stub.getPrice(Unknown Source)
Any suggestions?
Thanks in advance,
Su
Su,
I have been having same problem you have experimented. I did not quite understand the change you made exactly. Can you please help.
Thanks
Sam
<?xml version="1.0"?>
<definitions
name="stockquote"
targetNamespace="http://quote.com/stockquote.wsdl"
xmlns:tns="http://quote.com/stockquote.wsdl"
xmlns:xsd1="http://quote.com/stockquote.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="http://quote.com/stockquote.xsd"
xmlns="http://www.w3.org/2000/10/XMLSchema">
<element name="TradePriceRequest">
<complexType>
<all>
<element name="tickerSymbol" type="string"/>
</all>
</complexType>
</element>
<element name="TradePrice">
<complexType>
<all>
<element name="price" type="float"/>
</all>
</complexType>
</element>
</schema>
</types>
<message name="GetLastTradePriceInput">
<part name="body" element="xsd1:TradePriceRequest"/>
</message>
<message name="GetLastTradePriceOutput">
<part name="body" element="xsd1:TradePrice"/>
</message>
<portType name="StockQuotePortType">
<operation name="GetLastTradePrice">
<input message="tns:GetLastTradePriceInput"/>
<output message="tns:GetLastTradePriceOutput"/>
</operation>
</portType>
<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetLastTradePrice">
<soap:operation soapAction="http://quote.com/GetLastTradePrice"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="StockQuoteService">
<documentation>My first service</documentation>
<port name="StockQuotePort" binding="tns:StockQuoteBinding">
<soap:address location="http://quote.com/stockquote"/>
</port>
</service>
</definitions>
Hi Todor,
I found out what caused the problem: I used
"http://www.w3.org/2001/XMLSchema" as the
typeNameSpace in the configuration file that is passed
into the xrpcc tool when generates the wsdl document.
Once I changed it to something else, everything works
fine.
Thanks,
Su
Similar Messages
-
Xrpcc: Generate stub from existing WSDL
Hi, I have an error when generating stub from existing WSDL using xrpcc tool.
Anyone know what is the problem? Thanks!
The error message:
warning: ignoring operation "registration": more than one part in input message
warning: ignoring operation "checkRegistration": more than one part in input message
warning: Port "AccountManagementService" does not contain any usable operations
warning: ignoring operation "registration": more than one part in input message
warning: ignoring operation "checkRegistration": more than one part in input message
warning: Port "AccountManagementService" does not contain any usable operations
Note: sun.tools.javac.Main has been deprecated.
1 warning
The WSDL file:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name="serverone.paymentofgovbill.service.useraccount.AccountManagementService"
targetNamespace="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementService"
xmlns:map="http://systinet.com/mapping/"
xmlns:ns0="http://systinet.com/xsd/SchemaTypes/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema targetNamespace="http://systinet.com/xsd/SchemaTypes/"
elementFormDefault="qualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://systinet.com/xsd/SchemaTypes/"
xmlns:map="http://systinet.com/mapping/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:ns0="http://systinet.com/xsd/SchemaTypes/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<xsd:element name="p0" type="xsd:string" nillable="true"/>
<xsd:element name="p1" type="xsd:string" nillable="true"/>
<xsd:element name="string_Response" type="xsd:string"
nillable="true"/>
<xsd:element name="int_Response" type="xsd:int"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="AccountManagementService_registration_1_Request">
<wsdl:part name="p0" element="ns0:p0"/>
<wsdl:part name="p1" element="ns0:p1"/>
</wsdl:message>
<wsdl:message name="AccountManagementService_checkRegistration_1_Request">
<wsdl:part name="p0" element="ns0:p0"/>
<wsdl:part name="p1" element="ns0:p1"/>
</wsdl:message>
<wsdl:message name="AccountManagementService_checkRegistration_Response">
<wsdl:part name="response" element="ns0:int_Response"/>
</wsdl:message>
<wsdl:message name="AccountManagementService_registration_Response">
<wsdl:part name="response" element="ns0:string_Response"/>
</wsdl:message>
<wsdl:portType name="AccountManagementService">
<wsdl:operation name="registration" parameterOrder="p0 p1">
<wsdl:input
message="tns:AccountManagementService_registration_1_Request"/>
<wsdl:output
message="tns:AccountManagementService_registration_Response"/>
</wsdl:operation>
<wsdl:operation name="checkRegistration" parameterOrder="p0 p1">
<wsdl:input
message="tns:AccountManagementService_checkRegistration_1_Request"/>
<wsdl:output
message="tns:AccountManagementService_checkRegistration_Response"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AccountManagementService"
type="tns:AccountManagementService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="registration">
<map:java-operation name="registration"
signature="KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylMamF2YS9sYW5nL1N0cmluZzs="/>
<soap:operation
soapAction="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementServiceAccountManagementService#registration#KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylMamF2YS9sYW5nL1N0cmluZzs="
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="checkRegistration">
<map:java-operation name="checkRegistration"
signature="KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylJ"/>
<soap:operation
soapAction="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementServiceAccountManagementService#checkRegistration#KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylJ"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AccountManagementService">
<wsdl:port name="AccountManagementService"
binding="tns:AccountManagementService">
<soap:address
location="http://localhost:6060/AccountManagementService/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>The JAXRPC spec. section 6.2 states:
"All message parts (either parameter or return value) appear inside a single wrapper element, which is the first child element of the SOAP Body element." For this to work with Doc/literal operations, all messages can contain only a single part. -
SAXException while generating stubs from WSDL
Hi Friends
i am stuck in a problem for which i need your help.
i am using the Axis wsdl2java tool to generate the client side stub classes.
the wsdl which i was using was referring to the port http://localhost/hth/services/Client?wsdl
i was running the wsdl2java tool on this wsdl to generate stubs. it was working fine.
Now i have removed the client.wsdl from the default localhost port and
want to keep it in some location like D:\wsdl\Client.wsdl so that i don't need to depend on the Application server everytime for the wsdl to be up all the time.
when i run the wsdl2java command on this location i get the following error.
org.xml.sax.SAXException: Fatal Error: URI=file:///D:/wsdl/Client.wsdl Line=1: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:723)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:218)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:482)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:595)
Please let me know what is the problem here and how can i resolve this issue.
here is bit of the sample client.wsdl
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="D:\wsdl\Client.wsdl" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="D:\wsdl\Client.wsdl" xmlns:intf="D:\wsdl\Client.wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="D:\wsdl\Client.wsdl" xmlns:tns2="http://client.hth.march.com" xmlns:tns3="http://exception.hth.march.com" xmlns:tns4="http://equipment.hth.march.com" xmlns:tns5="http://equipment.ws.hth.march.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)
-->
- <wsdl:types>
- <schema targetNamespace="D:\wsdl\Client.wsdl" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://equipment.ws.hth.march.com" />
<import namespace="http://xml.apache.org/xml-soap" />
<import namespace="http://exception.hth.march.com" />
<import namespace="http://client.hth.march.com" />
<import namespace="http://equipment.hth.march.com" />
<import namespace="http://localhost/hth/services/Client" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="HTHBaseDTO">
- <sequence>
<element name="md5Sum" nillable="true" type="xsd:string" />
<element name="primaryKey" nillable="true" type="xsd:integer" />
</sequence>
</complexType>
- <complexType name="VitalThresholdEnum">
- <sequence>
<element name="labelKey" nillable="true" type="xsd:string" />
<element name="pk" nillable="true" type="xsd:short" />
</sequence>
</complexType>
- <complexType name="VitalThresholdDTO">
- <complexContent>
- <extension base="tns1:HTHBaseDTO">
- <sequence>
<element name="categoryPk" nillable="true" type="xsd:short" />
<element name="clientCarePlanPk" nillable="true" type="xsd:long" />
<element name="clientPk" nillable="true" type="xsd:integer" />
<element name="clientVitalPrescriptionPk" nillable="true" type="xsd:integer" />
<element name="statusPk" nillable="true" type="xsd:short" />
<element name="syncStatusPk" nillable="true" type="xsd:short" />
<element name="thresholdType" nillable="true" type="tns1:VitalThresholdEnum" />
<element name="thresholdValue" nillable="true" type="xsd:double" />
<element name="unitTy
hoping for positive replies from your side.
Thanks & regards
Vikram KSo what was the problem? I am getting:
error: invalid element "{http://java.sun.com/jax-rpc-ri/xrpcc-config}configuration" in configuration file (line 3)
and I copied my config.xml from an example on xrpcc site! -
JDeveloper 10.1.3.2 - how to create a stub from WSDL?
Hello to all..
I have installet the last version of Jdeveloper.. since this I used JDev 10.1.2...
Can anybody help me how can i make classes (stub) from WSDL?
I have a WSDL file located on remote HTTPS server.. In JDev 10.1.2 i get error when i like to connect on https to retrive data...
But in JDev 10.1.3.2 I can't find a function to create a stub from wsdl..
There is only a option to create a java webservice from wsdl.. (but this will create a new webservice (right?)..
so.. how can I create a stub from remote wsdl..
best regardsAnother question...
For retriving information i must install a certificate...
I installed it for mozilla and explorer.. so if i acess to the url i get the wsdl definition
picture 1: http://freeweb.siol.net/peterv6i/picc2.jpg
In JDeveloper i get error DCA-40002
here is the picture: http://freeweb.siol.net/peterv6i/picc1.jpg
how to acess to wsdl if it requires a certificate? -
IWAB0399E Error in generating Java from WSDL: java.lang.RuntimeException:
Hi,
I did try to create web service client using eclipse. Imported wsdl to eclipse project and tried to create java client but I am getting following exception :
IWAB0399E Error in generating Java from WSDL: java.lang.RuntimeException: Unknown element _value
java.lang.RuntimeException: Unknown element _value
at org.apache.axis.wsdl.toJava.JavaBeanWriter.getBinaryTypeEncoderName(JavaBeanWriter.java:490)
at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeSimpleTypeGetter(JavaBeanWriter.java:928)
at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeAccessMethods(JavaBeanWriter.java:1102)
at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeFileBody(JavaBeanWriter.java:238)
at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127)
at org.apache.axis.wsdl.toJava.JavaBeanWriter.generate(JavaBeanWriter.java:1405)
at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:547)
at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:432)
at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
at java.lang.Thread.run(Unknown Source)
This works just fine in SoapUI. Also can access this from other clients.
You can access the wsdl fine from http://unit7165.oracleads.com:9008/opptyMgmtOpportunities/OpportunityService?wsdl
Does anybody know why this does not work in Eclipse?
Thanks.Hi Team,
I am too getting same exception when trying to create client side code from wsdl.
Below is what I am using :
wsdl link :
https://fap0607-crm.oracleads.com/mklLeads/SalesleadService?wsdl
Tools I used : Apache Axis 1.4 jars and used command - wsdl2java
I guess, it's a bug already reported here :
https:/issues.apache.org/jira/browse/AXIS-1828
Any pointer to this will help.
Regards,
Sumit -
Generating proxies from WSDL utility
Hey ..
Does BEA give a utility to generate client webservice proxy classes from a WSDL
I mean ..instead of any server classes to run clientgen..I have just the WSDL
and I need to generate the proxy classes for myself..I guess it defeats the purpose
of webservices(integration)..if I have to ask the webservice deployer for client
classes ..!
Thanx,
Krish"Krishnan Venkataraman" <[email protected]> wrote in message
news:[email protected]...
>
Manoj , u sure this is a valid link ...coz I cannot see a wsdl athttp://example.com/myapp/myservice.wsdl..
This should be the url to your wsdl. (the wsdl from which you want
to generate the service). You can also copy the wsdl to your local
machine and use the file url.
>
and is there any WLS70 dependency for me to generate these proxies ...Imean do
I need anything from WLS70 (jar files etc)for me to do this task ...?You need wls70. the clientgen ant task is provided by wls70.
>
BTW.. just to update u on our other issue we talked about...have a look atthe
below trace...Thanx,Krish
Shridhar ...
Couple of things ...
1) We will ask the webservice provider put the CR080927_70sp1.jar intheir classpath.
But instead of they generating the client-jar and runningVersionMaker on
this to give us the output , can we do this on ourside...
I understand that there is a way in which the client itself generatestheir
own proxies from the wsdl...In case we can do this ...isCR080927_70sp1.jar required
on
the client side also for generating the proxies...or is it required onthe
WLS70 side only at runtime...once we generate these proxies ourselves thenfor
compiling our 6.0 client and running it , I will use the output ofversionMaker
and wsclient70.jar.
2) Can u possibly mail me the patched jar files which u mention below byemail...and
send me a confirmation email saying u have sent it..coz we seem to havesome firewall
issues going to an outside ftpserver....and the confirmation mail is onlyincase
u send the mail and I do not get it coz of the size etc ..
Thanx,
Krish
Krishnan (Krish) Venkataraman
Bank of America Corp.
Senior Technology Analyst
Email: [email protected]
Work # : 646 733 4248
Cell # : 646 210 5482
-----Original Message-----
From: Shridhar Mysore [mailto:[email protected]]
Sent: Friday, November 01, 2002 12:38 PM
To: Venkataraman, Krishnan
Subject: Invoking 7.0 WS from 6.0 WS client [ Case 367229 ]
Hello Krishnan,
Firstly, your present configuration (involving the use of a SessionBeanin 6.0sp1
as WS client calling into a WS hosted in 7.0sp1) where you are using 7.0webserviceclient.jar
alongside 6.0 weblogic.jar is not supported, nay non-viable. The result ofsuch
a configuration would lead to NoSuchMethodError exceptions which you haveseen
at your end.
Secondly, in order to solve this we need to use portable stubs for WSclients,
a feature, that has been included in
7.0 SP02 ! We, however have made this feature available on 7.0 SP01 aswell in
the form of a one-off patch !
And the following is a procedure for enabling this on 7.0SP01 :
- Add the one-off patch ( CR080927_70sp1.jar ) at the beginning of theCLASSPATH
in your 7.0 server startup script. Ensure that you restart the server forthis
to kick in.
- Generate the client jar for the 7.0 WS
- Run the weblogic.webservice.tools.versioning.VersionMaker utility bysupplying
the client jar to generate re-versioned classes.
- Compile the WS client in 6.0 by supplying the re-versioned classes(generated
from VersionMaker ) and wsclient70.jar (note wsclient70.jar should workwith
6.x versions)
- Run the WS client in 6.0 by supplying the re-versioned classes(generated from
VersionMaker ) and wsclient70.jar
Lastly, please find/download the following files from our FTP server(ftpsupport.beasys.com)
at /pub/case367229
by logging in with username/password as support/pechool
( Note : this password is valid for the week of Oct 27, 2002 )
CR080927_70sp1.jar - one-off patch for 7.0sp01
wsclient70.jar - this would be used instead ofwebserviceclient.jar by
6.x WS client/s
"manoj cheenath" <[email protected]> wrote:
Sure. you can generate client from a WSDL.
Please try this:
<clientgen wsdl="http://example.com/myapp/myservice.wsdl"
packageName="myapp.myservice.client"
clientJar="c:/myapps/myService_client.jar"/>
regards,
-manoj
"Krishnan Venkataraman" <[email protected]> wrote in message
news:[email protected]...
Hey ..
Does BEA give a utility to generate client webservice proxy classesfrom a
WSDL
I mean ..instead of any server classes to run clientgen..I have justthe
WSDL
and I need to generate the proxy classes for myself..I guess it defeatsthe purpose
of webservices(integration)..if I have to ask the webservice deployerfor
client
classes ..!
Thanx,
Krish -
Clientgen issues wihile generating clientjar from wsdl
Hi,
Iam trying to generate client stubs from the wsdl file using ant clientgen
Iam getting the following error while building.
<weblogic.webservice.tools.build.WSBuildException: unable to find any soap port:><service name="SomeWebServic
e">
<port name="SomeWebServicePort"
binding="tns:PSIVzWebServicePort">
<soap:address location=" http://localhost:7001/somewebservice/SomeWebService">
</soap:address>
</port>
</service> - with nested exception:
[weblogic.webservice.tools.wsdlp.WSDLParseException: unable to find any soap por
t:<service name="SomeWebServic
e">
<port name="SomeWebServicePort"
binding="tns:PSIVzWebServicePort">
<soap:address location=" http://localhost:7001/somewebservice/SomeWebService">
</soap:address>
</port>
</service>
Does anybodu know what could be the reason. The service has user defined data types.
Appriciated if anybody can send me the reply with the solution
Regards
ManikyalaThis issue was resolved by compiling with the new wsdl. The old one has some formatiing issues.
Regards
Manikyala -
Hello. I have a WSDL that I have generated some Java classes for. In the generated classes I code some helper methods. Then I do a change in the WSDL. Then I need to generate new Java classes(?). How about my helper methods then? I don't want to re-implement them in the newly generated classes.
And BTW, if I try to run "Regenerate Web Service from WSDL" (right-click the web service in jDeveloper project), I get a message "The return type xxx.yyy.Zzz of method getZzz cannot be serialized into XML, and no custom serializer has been defined for it". What does this message mean, and how can I be able to "Regenerate Web Service from WSDL" (if the WSDL changes).
I'll be happy for any articles about this topics.Hi,
when you say that you generate Java classes for a WSDL file, I assume you generate a Web Service proxy - am I right? In this case I suggest to create wrapper classes for those that you want to add your custom code in. E.g the proxy class is re-generated, whereby all custom code gets lost. Instead of working with the proxy class directly, you create a Java Bean that accesses the proxy class. This then never changes.
Frank -
Using oc4j to generate interfaces from wsdl produced improper method names
The method names that were produced from the opperations in my WSDL, generated an interface file with incorrect method names. The name went from "DoTest" in the wsdl to "doTest" in the Interface file.
I double checked and all the cases are correct in the wsdl.
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by John Reynolds (MedPlus) -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:y="http://localhost/TestService" targetNamespace="http://localhost/TestService">
<types>
<xs:schema targetNamespace="http://localhost/TestService" xmlns="http://www.w3.org/2001/XMLSchema">
<xs:element name="Tresult" type="xs:string"/>
<xs:element name="Tname" type="xs:string"/>
<xs:element name="Tfault" type="xs:string"/>
</xs:schema>
</types>
<message name="DoTestResponse">
<part name="Result" element="y:Tresult"/>
</message>
<message name="DoTestRequest">
<part name="Name" element="y:Tname"/>
</message>
<message name="DoTestFault">
<part name="ExceptionDetail" element="y:Tfault"/>
</message>
<portType name="TestService">
<operation name="DoTest">
<input message="y:DoTestRequest"/>
<output message="y:DoTestResponse"/>
<fault name="DoTestException" message="y:DoTestFault"/>
</operation>
</portType>
<binding name="TestService" type="y:TestService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="DoTest">
<soap:operation soapAction="urn:#DoTest" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="DoTestException">
<soap:fault name="DoTestException" use="literal"/>
</fault>
</operation>
</binding>
<service name="TestServiceSoap">
<port name="TestService" binding="y:TestService">
<soap:address location="http://localhost/TestService"/>
</port>
</service>
</definitions>Obviously one could rename the operation to that standard, but that doesn't exactly strike me as being anything other that a work around for a bug.
WSDL provides a contract in which multiple languages have to conform to a set of interfaces, and it's not exactly good to have a tool, just a assume the contract for an interface is wrong.
I could argue that I'm only doing Java on the front end and .Net on the client side and that they don't neccessarily follow the Java convention, nor should be constrained by it.
I do agree with you that they probably just followed the convention when writing to code generator and just happened to pick up the convention. They just need to fix it now. -
Service Control Not Being Generated Correctly from WSDL
Hello,
I am using BEA Workshop for WebLogic Platform 9.2.0 for development. I created a web service in Workshop, which exposes 3 methods... one of the methods, putPlan(), accepts two parameters.
After generating the WSDL from the web service class, I ran the Web Service Client Wizard. I was able to successfully access and test the web service with the generated client code.
However, in another project, I generated a service control from the WSDL. Although the service control was created without any errors, the control itself does not appear to be correct: it defines the putPlan() method as accepting only one parameter instead of the expected two.
The WSDL itself looks good, as it clearly defines two input parameters to the putPlan() method. And, the Web Service Client wizard had no problems generating valid client code from the WSDL. So, I am confused as to why the generated service control is not right.
Any help with this problem would be greatly appreciated.
Thanks!Hi Debbie,
When you created the service control did you choose the option to generate xmlbean types for the service or did you generate jax/rpc types ?
Can you send the service, wsdl and control to me via email at akraj_at_yahoo.com ?
cheers
Raj -
Generatin client stubs from wsdl file
i user wsimport to generate the client stubs
look like i am missing some files
like the service port/stub..
please helpi user wsimport to generate the client stubs
look like i am missing some files
like the service port/stub..wsimport is run on a WSDL and it generates all required stubs for you. What is the exact nature of your problem ? more details please -
Generating proxy from wsdl ends in error
Our sap installation is 'SAP ECC 6.0' and I'm trying to generate proxy (for testing purposes) from se80 by using url: http://cheeso.members.winisp.net/books/books.asmx?WSDL
Proxy generationg is cancelled by the system and I get message in se80 saying:
'Exception occurred in library handler
Not implemented'
This was working earlier on our system (older sap release) and I also tested this on other sap (SAP ERP Central Component 5.0) and it works.
Does anyone have an idea, what is wrong?I am facing the same problem.
Take a look at
https://websmp130.sap-ag.de/sap(bD1lcyZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=748781
https://websmp130.sap-ag.de/sap(bD1lcyZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=809792
They correspond to : note 748781 and 809792 in SAP Service Marketplace
The XML format for proxy generation : note 944029
I hope it helps you. -
Generate Proxy from WSDL with multiple Files
I need to load a WSDL (to generate a web service consumer proxy). However, that WSDL is build from multiple files, both .wsdl and .xsd, not a single one. It seems the SAP wizard to generate the proxy does expect one single WSDL file however.
Is there a way in SAP to load a WSDL with multiple files, or do I need to (manually) flatten all these files into one single file?I am not sure why it fails in WebSphere. Please try posting
this question to a WebSphere newsgroup.
Regards,
-manoj
http://manojc.com
"viswanath" <[email protected]> wrote in message
news:40aee7fa$1@mktnews1...
>
thanks manoj for your reply.
I'm using IBM WebSphere SDK for Web Services v5.1
for generation of java client.
I'm able to generate the client but the problem is
the WSDl2Java command ignored the SOAPHeaders while
generating the proxy. Since I'm using SOAP headers for
authentication the code fails.
Thanks,
Viswanath
"manoj cheenath" <[email protected]> wrote:
I am not sure which tool you are using
to generate web service clent. To generate
a WLS web service client you have to use clientgen.
Details here:
http://e-docs.bea.com/wls/docs81/webserv/anttasks.html
Regards,
-manoj
http://manojc.com
"viswanath" <[email protected]> wrote in message
news:40ad8a07$[email protected]..
HI,
I have a web service (implemented in .NET) which extends soap headersfor
doing
Authentication. WSDL is generated out of this web service. But wheni use
wsdl2java
(J2EE) to generate a proxy class, there is no interface generated forsoap
headers.
Without extending SOAP headers the web service works fine.
Basically, I'm looking for a way to generate java interfaces (ie.
proxies)
for
SOAP headers out of the WSDL file.
PFA the WSDL file and the proxy
Any help on this is appreciated. -
Using WSDL2java to generate proxy from wsdl
HI,
I have a web service (implemented in .NET) which extends soap headers for doing
Authentication. WSDL is generated out of this web service. But when i use wsdl2java
(J2EE) to generate a proxy class, there is no interface generated for soap headers.
Without extending SOAP headers the web service works fine.
Basically, I'm looking for a way to generate java interfaces (ie. proxies) for
SOAP headers out of the WSDL file.
PFA the WSDL file and the proxy
Any help on this is appreciated.
[WSOClient.zip]I am not sure why it fails in WebSphere. Please try posting
this question to a WebSphere newsgroup.
Regards,
-manoj
http://manojc.com
"viswanath" <[email protected]> wrote in message
news:40aee7fa$1@mktnews1...
>
thanks manoj for your reply.
I'm using IBM WebSphere SDK for Web Services v5.1
for generation of java client.
I'm able to generate the client but the problem is
the WSDl2Java command ignored the SOAPHeaders while
generating the proxy. Since I'm using SOAP headers for
authentication the code fails.
Thanks,
Viswanath
"manoj cheenath" <[email protected]> wrote:
I am not sure which tool you are using
to generate web service clent. To generate
a WLS web service client you have to use clientgen.
Details here:
http://e-docs.bea.com/wls/docs81/webserv/anttasks.html
Regards,
-manoj
http://manojc.com
"viswanath" <[email protected]> wrote in message
news:40ad8a07$[email protected]..
HI,
I have a web service (implemented in .NET) which extends soap headersfor
doing
Authentication. WSDL is generated out of this web service. But wheni use
wsdl2java
(J2EE) to generate a proxy class, there is no interface generated forsoap
headers.
Without extending SOAP headers the web service works fine.
Basically, I'm looking for a way to generate java interfaces (ie.
proxies)
for
SOAP headers out of the WSDL file.
PFA the WSDL file and the proxy
Any help on this is appreciated. -
How to generate class files from wsdl
I have upgraded weblogic from 9.1 to 10.3.5 and java from 1.5.0_06 to 1.6.0_27
Do I have to regenerate my webservices classes like the stub ,impl and service class.
also there are a few changes in the wsdl .
Please help me how to generate classfiles from wsdl ?
Please help.
Thanks,Did you ever get an answer to this question? Did you proceed forward with the use of WSIF or did you select an alternative.
Ernie :)
Maybe you are looking for
-
Powering off and on on it;s own
For the past coule of days My iphone has been acting up like crazy...it shuts itself off and on on it's own..the times I have noticed I'll see the apple logo then 2 minutes later it goes on and asks for my password and I am able to get in...2 nights
-
I am on a 20"iMac. OSX 10.4.8, I am trying to log onto sirius.com with safari v2.0.4 Whenever it comes to the part where I choose my station I get a dialoge box from Safari that says,"Some content on this page requires Internet plug-in thast Safari d
-
How do I access my account credit when purchasing iTunes? I just purchased an album, but my credit card was charged. Thanks.
-
Hi there, Can someone advice to me please, if i have a Value Contract what is the best way of triggerin the sales order to be created for the contract? will it be automatically done? or is it manually done? how and who will genertae the Release Ord
-
Display regions dynamically on the same page
Hi I have 2 regions.Top is an interactive editable report.Bottom region is a read only report of the same(top region) But when i click search button(based on paramters 1&2, i am not able to see the same number of rows. Top region shows 5..But bottom