Dynamic client for document styled webservice
Hi ,
I created a document styled webservice when I try to run it using DII client I am getting the following problem
Exception in thread "Main Thread" javax.xml.rpc.JAXRPCException: failed to invoke operation 'testOperation' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.examples.com/types']:testOperation}]StackTrace[
Can anybody give me a simple example of creating document styled webservice and DII client using weblogic workshop 9.2
Thanks
Sksrinu
What's the question about??
Similar Messages
-
JAXRPC Client for document literal Webservice - ClassCastException
Hi...
I am consuming one document literal webservice in AquaLogicService Bus which is returning complex type object. I have created jax-rpc client (generated stubs) to consume that ALSB service. I am able to send the request and service also generating the SOAP response . but I am getting following exception when running client.
java.lang.ClassCastException: org.apache.axis.Message
at com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
at grpPolicy.GrpPolSP_Stub.queryByExample_HI(GrpPolSP_Stub.java:69)
at grpPolicy.PolicyClientStubs.main(PolicyClientStubs.java:22)
Here is my client:
try
Request inObject = new Request();
Request outObject = new Request();
PolicyData pData = new PolicyData();
pData.setGroupName("Pharmaceutical");
pData.setPolicyNumber("1");
inObject.setPolicyData(pData);
Group_spcPolicy_spcInbound service = new Group_spcPolicy_spcInbound_Impl();
GrpPolSP_Stub stub = (GrpPolSP_Stub) service.getGrpPolSP();
outObject = (Request) stub.queryByExample_HI(inObject);
System.out.println(outObject.getPolicyData().getGroupName());
catch(Exception e)
e.printStackTrace();
Below I have pasted my WSDL:
<?xml version="1.0" encoding="utf-8"?>
<s0:definitions targetNamespace="http://test.com/asi/" xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://test.com/asi/" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
<s0:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.test.com/xml/Request" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://test.com/asi/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsdLocal1="http://www.test.com/xml/Request">
<xsd:annotation>
<xsd:documentation>Test XSD Generation</xsd:documentation>
</xsd:annotation>
<xsd:element name="ListOfRequest" type="xsdLocal1:ListOfRequest"/>
<xsd:complexType name="ListOfRequestTopElmt">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ListOfRequest" type="xsdLocal1:ListOfRequest"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ListOfRequest">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="PolicyData" type="xsdLocal1:PolicyData"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PolicyData">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="EffectiveDate" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EndDate" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="GroupName" type="xsdLocal1:string100"/>
<xsd:element maxOccurs="1" minOccurs="0" name="PolicyNumber" type="xsdLocal1:string100"/>
<xsd:element maxOccurs="1" minOccurs="0" name="State" type="xsdLocal1:string10"/>
<xsd:element maxOccurs="1" minOccurs="0" name="Type" type="xsdLocal1:string30"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="string10">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="string30">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="string100">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="string20">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://test.com/asi/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://test.com/asi/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsdLocal1="http://www.test.com/xml/Request">
<xsd:import namespace="http://www.test.com/xml/Request"/>
<xsd:element name="QueryByExample_HI_Input">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="xsdLocal1:ListOfRequest"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="QueryByExample_HI_Output">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="xsdLocal1:ListOfRequest"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</s0:types>
<s0:message name="QueryByExample_HI_Input">
<s0:part element="s1:QueryByExample_HI_Input" name="QueryByExample_HI_Input"/>
</s0:message>
<s0:message name="QueryByExample_HI_Output">
<s0:part element="s1:QueryByExample_HI_Output" name="QueryByExample_HI_Output"/>
</s0:message>
<s0:portType name="GrpPolSP">
<s0:operation name="QueryByExample_HI">
<s0:input message="s1:QueryByExample_HI_Input"/>
<s0:output message="s1:QueryByExample_HI_Output"/>
</s0:operation>
</s0:portType>
<s0:binding name="GrpPolSP" type="s1:GrpPolSP">
<s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<s0:operation name="QueryByExample_HI">
<s2:operation soapAction="document/http://test.com/asi/:QueryByExample_HI"/>
<s0:input>
<s2:body use="literal"/>
</s0:input>
<s0:output>
<s2:body use="literal"/>
</s0:output>
</s0:operation>
</s0:binding>
<s0:service name="Group_spcPolicy_spcInbound">
<s0:port binding="s1:GrpPolSP" name="GrpPolSP">
<s2:address location="http://localhost:7021/POC/Service/GroupPolicy"/>
</s0:port>
</s0:service>
</s0:definitions>Hi,
Are you talking about uisng WSIF invocation from ESB or BPEL? I am also trying to explore the possibility of invoking a service via HTTP binding available from WSIF providers. I know we can do this in BPEL. Wondering about how to do this in ESB.
Regards,
Rajesh -
Issue when Converting RPC styled Webservice to Document Styled Webservice
Hi All,
My requirement is to create a Document style WS using Jdev10.1.2 and deploy it in the OAS server 10.1.2 which follows J2EE1.3 standards.
since jdev10.1.2 does not have inherit option of developing Doc'Style WS,
I created a RPC Styled Webservice using Jdeveloper10.1.2 and converted it into Document styled webservice by changing the WEB.xml file in the WS project.
The link from which i learned the changes is given below
http://radio-weblogs.com/0132036/2003/12/07.html
PFB the changes made in my WEB.xml file.
<servlet-class>oracle.j2ee.ws.StatelessJavaRPCWebService</servlet-class> to <servlet-class>oracle.j2ee.ws.StatelessJavaDocWebService</servlet-class>.
I deployed the WS in the OAS10.1.2 server successfully.
Now the ISSUE is when im invoking the webservice. It is failing with the following error.
Error parsing the WSDL for this endpoint.
javax.servlet.ServletException: WSDL Generation exception: Error: method HelloWorld -- cannot use document style binding when output requires encoding
how to solve this error ?
If any one came across this error.
pls help.What does the registry key you installed ?
If you want to get rid of the save dialog box, you can try to use the VBA code.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Close savechanges:=True "close and save changes, don't ask".
Me.Close savechanges:=False "close and don't save changes, don't ask".
End Sub
Wind Zhang
TechNet Community Support -
Building WSDL client for OIM SPML webservice
Has any one created WSDL client for OIM SPML webservice,
Any help is appreciated.
Thanks,
Pandu
old thread -->
add udfs to spml prov. request to oim
==========================
Hi,
I am provisioning users in OIM from by sending spml requests
I used the sample client that comes in xellerate directory.
How can I update spml requests to include UDFs to create user in him with udf s.
Thanks
Pandu
Edited by: pandu345 on Aug 5, 2009 3:27 PMHello there,
There is a .NET web service client which is successfully able to access the weblogic application server wsdl from oim 9101 and it can see the complete user profile as a response from the same.
1.) Now, there is a situation where oim needs to send some attribute values to that .NET web service client, after the data from their side comes to OIM and updates a single attribute values for e.g. PIN. How can we do that ?
2.) and I want to add some UDFs into the existing SPML provisioning user profile. How can I do that ?
3.) Also, how will OIM know that it was able to successfully send the attribute values to the web service client.
http://download.oracle.com/docs/cd/E10391_01/doc.910/e10360/creategtc.htm#Toc153968032
I have gone through this. I didnt found this in OIM 9101.
Any ideas/references/clues/hints appreciated in this concern.
Thanks in advance,
- oidm. -
Generate standalone java client for weblogic (11g) webservice
Hi All,
I am a newbie to web logic family. I am using web logic 11g server and deployed JAX-WS web service on it using the documentation given for the same. I have created one complex object to return some data from the server as web service. I am able to build, deploy and run the web service using ant task on same machine.
But I need to deploy client classes on another machine and call web service from machine other than I am using for creating and deploying web service. Can you please tell me how can I achieve this ? Which jar files are needed to run a web service client generated through ant task and how can I create web service client differently using Eclipse IDE?
I have generated Client classes as jar using eclipse OEPE but I dont have any idea how can I use it because it changes the package name and class names also :(
Please help me out any hint would be greatly appreciated. :)Hi All,
I have found all the answers regarding my query from the link below :
[Overview of Web Services Invocation|http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv/client.html#wp229351]
May be this would be helpful to the newbie who is just like me :) yippy :) -
Dynamic Text for Recurring Documents
Hello all,
I want to know how to use dynamic texts for Document Header field in recurring documents.
We run the recurring program each month (F.14). I would like the document header text to have the dates of that month eg "01/06/08 - 30/06/08". If we hard code this in, each month we need to go into the recurring template and change the dates for the appropriate month - this defeats the purpose of having recurring documents.
Any help would be greatly appreciated.
Thanks,
Belindahi Belinda,
Welcome to SDN
I think this could be done with a substitution exit. Prerequisite will be the recurring document number and if that matches, the text has to be built up acc. to the current periods. It requires some coding, but I believe it is makable.
hope this helps
ec -
How to use wsdl in dynamic client
In wls 700, I want to know how to write a dynamic client to invoke a webservice by
passing wsdl?
In the example directory, there is an example, but I would like to know how I can
customize to use my own wsdl? clientgen puts wsdl in client jar file why is that?Hi fkeita,
If you haven't already done so, you should check out the following link in the BEA
product documentation:
http://edocs.bea.com/wls/docs70/webServices/client.html#1049007
Outside of that, you can always stayed tuned to the "dev2dev" page :-)
Regards,
Mike Wooten
"fkeita" <[email protected]> wrote:
>
Hi Mike,
Can you elaborate more how I can find the url of wsdl?
Do you know any documentation which explains the process of using dynamic
clinet?
Thanks.
"Michael Wooten" <[email protected]> wrote:
Hi fkeita,
The client.jar contains a "static" WSDL, because some folks like to avoid
making
a network (or internet) call to retrieve the "dynamic" one :-)
If you try to use "user-defined" types, with a WSDL and a "dynamic" client,
you will
experience "difficulties". This is due to the way the JAX-RPC defines the
createService()
method on the ServiceFactory class. Normally, this is the method you pass
the URL
to the WSDL you want to use. Currently, we call the WSDL parser in this
method, which
has a "side-effect" of needing to have the type mappings for your "user-defined"
types, already registered when it is called. With "stub-style" clients,
this is not
a problem (because the plumbing does this for you), but with "dynamic"ones
it doesn't.
Right now, the only real workaround is to have your client class extend
our weblogic.webservice.core.soap.SOAPElementImpl
class, as in the following code fragment:
#### START OF EXTRACT #####
import javax.xml.rpc.Call;
import javax.xml.rpc.namespace.QName;
import weblogic.webservice.core.rpc.ServiceImpl;
public class ServiceClient extends ServiceImpl
public ServiceClient(String schemeHostPort) throws Exception
// We pass the URL for the "dynamic" WSDL in the
// first argument. The second argument is the
// path to the XML file that the <clientgen> Ant
// task recorded your typemapping info in. It is
// in your client.jar, along with the "static"
// WSDL I mentioned :-)
super(
(schemeHostPort == null ? "http://localhost:7001" : schemeHostPort)
+
"/mea/gateway?WSDL",
"examples/webservices/jaxrpc/consumer/anamitra/dii/MEAGatewayService"
//define qnames
String targetNamespace = "http://www.bea.com/examples/MEAGateway";
QName serviceName = new QName( targetNamespace, "MEAGatewayService" );
QName portName = new QName( targetNamespace, "MEAGatewayServicePort");
//create call
Call call = super.createCall(
portName,
new QName(targetNamespace, "processExternalDataBatch")
ArrayList alist = new ArrayList();
alist.add(new String("One"));
alist.add(new String("Two"));
alist.add(new String("Three"));
alist.add(new String("Four"));
alist.add(new String("Five"));
String result = (String)call.invoke( new Object[]{ alist } );
System.out.println("result=" + result);
public static void main( String[] args ) throws Exception
System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
System.setProperty("javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
new ServiceClient(args[0]);
//private:
private final static boolean debug = false;
### END OF EXTRACT ###
Happy coding :-)
Regards,
Mike Wooten
"fkeita" <[email protected]> wrote:
In wls 700, I want to know how to write a dynamic client to invoke a webservice
by
passing wsdl?
In the example directory, there is an example, but I would like to know
how I can
customize to use my own wsdl? clientgen puts wsdl in client jar file why
is that? -
Dynamic Selections for the F.42 report
Hii Experts,
I want to add a field called Business Place(BUPLA) in dynamic Selection in tcode F.42.
So, in F.42 KDF Logical Database is used, so i make a Custom Selection view for KDF database.
Business place is successfully added in Dynamic Selection, but it doesn`t reflect when i execute F.42.
When i test from SE36, it reflects.
Nitin GargNote 50370 explains in full detail how the system works for selecting the documents with dynamic selection.
Balance report reads the transaction figures which are stored with the help of several different fields, so the selection according to further fields cannot be proceed. This is standard design.
The dynamic selection for Document Data does not work for reports which use customer / vendor transaction tables (KNC1 LFC1),i.e., document data like doc.number and Doc.date is not stored in transaction tables.
Dynamic selections can only be used with customer / vendor, company code
or fiscal year fields. The following reports are affected by this
program design.
S_ALR_87012186 - Customer sales
S_ALR_87012082 - Vendor Balances in Local Currency
S_ALR_87012093 - Vendor Business
S_ALR_87012079 - Transaction Figures: Account Balance
S_ALR_87012080 - Transaction Figures: Special Sales
S_ALR_87012081 - Transaction Figures: Sales
S_ALR_87012105 - List of Down Payments open at Key Date - Vendors
S_ALR_87012172 - Customer balances in local currency
RFKSLD00 - F.42
RFDSLD00 - F.23
Hope this clarifies.
Kind Regards
Soumya -
Does anyone has any example for Document-Oriented Webservice...?
thankshttp://manojc.com/?sample13
Hope this helps
Ajay
"a" <[email protected]> wrote in message news:[email protected]..
Does anyone has any example for Document-Oriented Webservice...?
thanks -
Document Oriented Webservices - Having problems
I am trying to develope a simple document oriented webservice. But, for some reason when I try to invoke it, I am getting a error message saying that the remote method could not be found.
Here is what I did,
1. Created a POJO with one method that takes string as a parameter.
2. Used servicegen task to build the webservice. Didn't change the style here.
3. Deployed it and tried to invoke it. It worked fine.
4. Changed the style to "document" in the ant task deployed it again. Above mentioned exception from weblogic.
- Didn't use any non-built in data types.
- Weblogic 8.1 SP 2.
Am I missing something? Please help. Its kinda urgent. If someone has a simple example for document oriented webservice could you please post it?
Thanks in advance.
- AspertOptical Character Recognition. Basically Acrobat tries to read the graphic and replace any text it thinks it sees with the text. There are 3 versions. Two provide the text in the background (searchable) and leave the graphics alone for viewing. ClearScan replaces the graphic with a combination of graphics and the intepretation of the text. Try it on a sample graphic that you can import for a TIF or JPeg. Also, TIF and such give better results because they are lossless in the storage.
-
Dynamic webservice client for User-defined datatypes
Hi All,
I have a webservices with user-defined datat types. I want to write a dynamic client that will work even if there are any changes in the wsdl, so that I do not want to recompile the client or make any changes on the client side.
I tried using DII but we need to modify the custome objects and recompile the same. Suggest me any alternative.
Regards,
SanjayRob, unfortunately not. If I ever come across the solution, I will post it here.
The reason I wanted to use weblogic webservices was to take advantage of the asynchronous webservice functionality. I ended up using xfire instead for my webservices, as we already had that in place in the application, and then using polling clients to get the response. Not an ideal solution, but it works very good anyway.
regards,
Marcus -
Dynamic web-client for WebService
Hi All,
I want to create a generic Web Client for various in-house webservices.
The page to prepare and submit SOAP request to the WebService should be dynamically formed according to the WSDL, so that I dont have to write new html/jsp page for each new WebService.
Can you suggest any library to achieve this?
Thanks in Advance..hello
even if you use html client you wanna allow access on ldap server box and port in the firewall. -
Workshop : webservices : Dynamic Client
I am using WebLogic Workshop 8.1 to crate a test Web Service.
I have created a webservice with two methods to support
1. SOAP RPC call
2. SOAP document call
This is working fine with the test harness provided by workshop.
I have written two Dynamic clients to test this web service (one for soap RPC
type call and another for soap "document" type call).
The SOAP RPC type call dynamic client is working fine.
The SOAP "document" type call dynamic client is throwing the following exception
javax.xml.rpc.JAXRPCException: failed to invoke operation 'ReservationRQ' due
to an error in the soap layer (SAAJ); nested exception is: Message[ failed to
serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}]StackTrace[
javax.xml.soap.SOAPException: failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:328)
at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:297)
at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:619)
at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:206)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:444)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:430)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:539)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
at TestWSClientDoc.main(TestWSClientDoc.java:74)
Caused by: weblogic.xml.schema.binding.SerializationException: mapping lookup
failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(RuntimeUtils.java:151)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:187)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:174)
at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:324)
... 9 more
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:559)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
at TestWSClientDoc.main(TestWSClientDoc.java:74)
Failed to send doc.
I have attached a zip file conatining the following files with this.
TestWebService.jws - web service code
TestWSClientDoc.java - dynamic client to test "document" type call
TestWSClientRpc.java - dynamic client to test "rpc" type call
test.xml – test document.
Could you please let me know here am I doing wrong?
Thanks
Purna
[webservice.zip]Hi Mike,
Your code worked for me. I will go from here.
Thanks,
Purna
"Michael Wooten" <[email protected]> wrote:
>
>
>
Hi Purna,
I have attached the source for a DII client that I think may work for
you.
It contains comments that describe what I think is causing the problem
you are
having in WLW 8.1, because I was having the same problem in WLW 7.0 :-)
You'll need to have %WL_HOME%\server\lib\webservices.jar in the client's
CLASSPATH,
because that's where the ElementCodec (and DocumentCodec) is. Let me
know if it
works.
Regards,
Mike Wooten
"Purna" <[email protected]> wrote:
Hi Bruce,
The example you provided is working fine. In fact I had used your example
to write
the Dynamic client.
Background on my requirement:
I had created a web service out of my application, which has set ofenterprise
java beans. The web service is working fine with WLW test harness and
static client.
I want to write a Dynamic Cient for this web service. Inside this web
service
the methods are expecting a document object. I am getting the exceptions
for
the Dynamic Client.
Please find the attached zip file containg the wsdl files.
It would be great if you can provide a working document style web service
(*.jws
file - generated from WL workshop) and Dynamic Client code.
Thanks,
Purna
Bruce Stephens <[email protected]> wrote:
Hi,
I would suggest trying to narrow down the problem. I suspect that there
are server side issues. Try going back to this example and making
sure
it works OK.
http://newsgroups.bea.com/cgi-bin/dnewsweb/domdocdyn.zip?cmd=article&group=weblogic.developer.interest.webservices&item=4127&part=2&utag=&/domdocdyn.zip
Spin up WLW and compare the two WSDLs. I suspect there will be some
differences that could be causing your problem.
Could you tell us a bit about your goal?
Thanks,
Bruce
Purna wrote:
Hi Bruce,
I have removed the "rpc" style method and now I have only "document"style method,
but still I am getting the same exception with Dynamic Client.
Do you have any suggetions?.
Thanks,
Purna
Bruce Stephens <[email protected]> wrote:
Hello,
Take a look at "style" attribute:
http://edocs.bea.com/wls/docs81/webserv/wsp.html#1015120 in the
web-service element, it states the "style" attribute applies to
an
entire Web Service, all operations specified in a single <web-service>
element must be either RPC-oriented or documented-oriented; WebLogic
Server does not support mixing the two styles within the same Web
Service.
Hope this helps,
Bruce
purna wrote:
I am using WebLogic Workshop 8.1 to crate a test Web Service.
I have created a webservice with two methods to support
1. SOAP RPC call
2. SOAP document call
This is working fine with the test harness provided by workshop.
I have written two Dynamic clients to test this web service (one
for
soap RPC
type call and another for soap "document" type call).
The SOAP RPC type call dynamic client is working fine.
The SOAP "document" type call dynamic client is throwing the followingexception
javax.xml.rpc.JAXRPCException: failed to invoke operation 'ReservationRQ'due
to an error in the soap layer (SAAJ); nested exception is: Message[failed to
serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
mapping lookup failure. class=interface javax.xml.soap.SOAPElement
class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}]StackTrace[
javax.xml.soap.SOAPException: failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
mapping lookup failure. class=interface javax.xml.soap.SOAPElement
class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:328)
at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:297)
at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:619)
at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:206)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:444)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:430)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:539)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
at TestWSClientDoc.main(TestWSClientDoc.java:74)
Caused by: weblogic.xml.schema.binding.SerializationException:
mapping
lookup
failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(RuntimeUtils.java:151)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:187)
at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:174)
at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:324)
... 9 more
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:559)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
at TestWSClientDoc.main(TestWSClientDoc.java:74)
Failed to send doc.
I have attached a zip file conatining the following files with
this.
TestWebService.jws - web service code
TestWSClientDoc.java - dynamic client to test "document" type
call
TestWSClientRpc.java - dynamic client to test "rpc" type call
test.xml – test document.
Could you please let me know here am I doing wrong?
Thanks
Purna
Name: webservice.zip
webservice.zip Type: Zip Compressed Data (application/x-zip-compressed)
Encoding: base64 -
Exception while invoking webservices using Dynamic client without WSDL
Hi All,
I am getting the below exception while invoking webservices using Dynamic client without WSDL.
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
Exception in thread "main"
Please find my source file below....
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;
import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;
public class TestWSWithoutWSDL {
public static void main(String[] args) {
try{
String address = "<WSDL's SOAP Address>";
String namespaceURI = "<namespaceURI>";
String serviceName = "<serviceName>";
String portName = "<portName>";
String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
String agencyID = "AGN00533";
String fileName = "testWS";
String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory factory = ServiceFactory.newInstance();
* Create an instance of the Service with the given service QName
Service service = factory.createService(new QName(serviceName));
Call call = service.createCall(new QName(portName));
call.setTargetEndpointAddress(address);
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
* Set operation name to invoke.
call.setOperationName(new QName(namespaceURI,"<operationName>"));
* Add parameters definitions in the call object.
call.addParameter("string", stringQName, String.class, ParameterMode.IN);
call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
* Set definition of the return type.
call.setReturnType(stringQName);
Object[] inParams = new Object[3];
inParams[0] = new String(agencyID);
inParams[1] = new String(fileName);
inParams[2] = new String(xmlString);
String result = ((String)call.invoke(inParams)).toString();
System.out.println(result);
}catch (Exception e){
e.printStackTrace();
Please give your suggestions for the above said exception....
Thanks & Regards....Hi All,
I am getting the below exception while invoking webservices using Dynamic client without WSDL.
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
Exception in thread "main"
Please find my source file below....
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;
import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;
public class TestWSWithoutWSDL {
public static void main(String[] args) {
try{
String address = "<WSDL's SOAP Address>";
String namespaceURI = "<namespaceURI>";
String serviceName = "<serviceName>";
String portName = "<portName>";
String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
String agencyID = "AGN00533";
String fileName = "testWS";
String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory factory = ServiceFactory.newInstance();
* Create an instance of the Service with the given service QName
Service service = factory.createService(new QName(serviceName));
Call call = service.createCall(new QName(portName));
call.setTargetEndpointAddress(address);
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
* Set operation name to invoke.
call.setOperationName(new QName(namespaceURI,"<operationName>"));
* Add parameters definitions in the call object.
call.addParameter("string", stringQName, String.class, ParameterMode.IN);
call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
* Set definition of the return type.
call.setReturnType(stringQName);
Object[] inParams = new Object[3];
inParams[0] = new String(agencyID);
inParams[1] = new String(fileName);
inParams[2] = new String(xmlString);
String result = ((String)call.invoke(inParams)).toString();
System.out.println(result);
}catch (Exception e){
e.printStackTrace();
Please give your suggestions for the above said exception....
Thanks & Regards.... -
Web service dynamic client property for Call
Hi, Hope this is the right forum for web service questions. The oracle document (6 Developing JAX-RPC Web Service Clients) on web service client only shows the stub and properties can be set in stub. I would like to use dynamic client. Can Call object have some properties? what are they?
ThanksCan any one please help :-(
Maybe you are looking for
-
Conference calls all of a sudden do not work??
We have a Call Manager 5.1 with MGCP controlled gateways. Out of no where our ablility to ad hoc conference call does not work. We connect the calls and no one can hear one another. Any suggestions as to what could be the cause? Any feed back would b
-
Setting a private flag on an activity for a specific Partner Function
Hi. I have this requirement. Display on private flag "My activities". Display just the Activities for a specific Function partner ej. Parner Responsible. Actually the system displays on "my activities" the activities not just for person responsible b
-
I want to format my hard disk. but i want to take a copy of my oracle database so anyone can please give me the solution for how to take a back up and again how to reload to my new oracle database? if it succeeded is it possible to retain all the sch
-
My concern about ise authentication types
Hi, Is it possible to bind a certificate to a computer, so that it should be identity of one device only like a mac address? If it is not possible then can anyone tell wat is diff between a user or certificate based authentication except the encrypti
-
Why start my firefox to slow. Click on ico, and wait to 58 sec to start.
why start my firefox to slow. Click on ico, and wait to 58 sec to start. my computer Alkalmazás alapadatai Név Firefox Verzió 8.0.1 User Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1 Profilkönyvtár A profilkönyvtárt