JAX-RPC, DII and Complex Types
I am currently in the middle of a project at University on Web Services. I am trying to create a client which uses Dynamic Interface Invocation(DII) to obtain information from a web services server. Here is where it gets very interesting. I realize with the basic types such as String, float integer etc. it works fine but as long as I want to use complex types I am having some problems. Is there anyone out there who have are currently using DII with complex types.
Hello.
I have develop a small web service using jwsdp 1.4 using jaxrpc (static stub)
Sever is working fine but when I try to connect client with it. I get this message
prepare:
generate-client:
edit-config:
unedit-config:
compile-client:
run-client:
[java] java.rmi.RemoteException: HTTP-Transportfehler: java.net.MalformedUR
LException: no protocol: REPLACE_WITH_ACTUAL_URL; nested exception is:
[java] HTTP-Transportfehler: java.net.MalformedURLException: no protoco
l: REPLACE_WITH_ACTUAL_URL
[java] at org.me.hi.HiSEI_Stub.sayHi(HiSEI_Stub.java:87)
[java] at org.me.hi.HiClient.main(HiClient.java:10)
[java] Caused by: HTTP-Transportfehler: java.net.MalformedURLException: no
protocol: REPLACE_WITH_ACTUAL_URL
[java] at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpCl
ientTransport.java:140)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
java:92)
[java] at org.me.hi.HiSEI_Stub.sayHi(HiSEI_Stub.java:70)
[java] ... 1 more
BUILD SUCCESSFUL
Total time: 3 minutes 15 seconds
I did not get why client is unable to contact server.
Any help in this regard would very appreciable.
Thaks in advance
Similar Messages
-
Intercepting SOAP XML message in JAX-RPC Handler and calling a diff method
Is it possible to intercept the SOAP XML message in the JAX-RPC handler and avoid the serialization and deserialization (OR avoid XML data binding)
Here is a more detail question
My web service has two methods
1. One Method which accepts Java Object (this object is mapped with a Schema
Complex Type Element in my WSDL file)
2. Second method which accept simple String type.
I want my web service client to send java object (using the first method), so that the Input gets validate in the WSDL itself (before it hits the actual web service) but once the request gets validated i want to pass that converted SOAP XML String (on the Server side using JAX-RPC handler) to the Second method.The answer to this is that the WSDL had
elementFormDefault="qualified"
in the schema.
Changing to unqualified resulted in the desired output.
Note: The service was changed to handle both cases. -
How to use Adaptive WebService Model with CAF WebService and Complex Type
Hi All,
I am trying to use the Adaptive Web Service Model and call a WebService generated by the CAF. The return type of the WebService is a Complex Type.. I receive an exception when trying to instantiate the Model Node.
Does anybody know how to use the Adpative Web Service Model with CAF WebServices and Complex Types as return type?
Help is appreciated..
Thanks, JohannesThanks Mukesh.
It is not possible to apply the Service Controller Template on Enterprise Java Bean Models as described in the Document. When I try to aply the template on the EJB Model, NWDS says: Only Webservice Models and RFC Models are supported...???
I did not find any information about how to return complex types in AWS.. in this document???
Is there such information available? Has anybody ever done that? There must be a way to do that.. Is is the standard approach, isn't it...? Please help me out there.. I need to get this running..
Thanks, Johannes -
JWSDP and complex type extension problem
Hy,
We got a problem with JAX-RPC reference implementation. It seems it doesn't support inheritance beetween complex types as web services parameters or return value. A Parse exception happens when client code deserializes base class members. Does anyone know about this problem ? We don't have it with Apache Axis implementation (on client side). In our case, server code always runs in C++ with gSOAP.
And the stacktrace :
deserialization error: unexpected XML reader state. expected: END but found: START: longitude
Here our wsdl file :
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Service"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:ass"
xmlns:tns="urn:ass"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:WAT="urn:ass/WAT.xsd"
xmlns:ifg="urn:ass">
<types>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:ass/WAT.xsd"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:WAT="urn:ass/WAT.xsd"
xmlns:ifg="urn:ass">
<complexType name="Date">
<sequence>
<element name="time" type="xsd:long" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="DateStruct">
<all>
<element name="inst" type="WAT:Date" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="IcaoCode">
<sequence>
<element name="s" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
<element name="isAlphaNum" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="IcaoCodeStruct">
<all>
<element name="inst" type="WAT:IcaoCode" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Ident">
<sequence>
<element name="Id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
<element name="Text" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
</sequence>
</complexType>
<complexType name="IdentStruct">
<all>
<element name="inst" type="WAT:Ident" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Latitude">
<sequence>
<element name="s" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
</sequence>
</complexType>
<complexType name="LatitudeStruct">
<all>
<element name="inst" type="WAT:Latitude" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Longitude">
<sequence>
<element name="s" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
</sequence>
</complexType>
<complexType name="LongitudeStruct">
<all>
<element name="inst" type="WAT:Longitude" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Notam">
<sequence>
<element name="Id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Text" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
</sequence>
</complexType>
<complexType name="NotamStruct">
<all>
<element name="inst" type="WAT:Notam" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Pib">
<sequence>
<element name="Id" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
</sequence>
</complexType>
<complexType name="PibStruct">
<all>
<element name="inst" type="WAT:Pib" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="AirField">
<sequence>
<element name="longitude" type="WAT:Longitude" minOccurs="1" maxOccurs="1"/>
<element name="latitude" type="WAT:Latitude" minOccurs="1" maxOccurs="1"/>
<element name="codeICAO" type="WAT:IcaoCode" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="AirFieldStruct">
<all>
<element name="inst" type="WAT:AirField" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="SunTime">
<complexContent>
<extension base="WAT:AirField">
<sequence>
<element name="sunriseTime" type="WAT:Date" minOccurs="1" maxOccurs="1"/>
<element name="sunsetTime" type="WAT:Date" minOccurs="1" maxOccurs="1"/>
<element name="heuresCalculees" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="heuresExistent" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="SunTimeStruct">
<all>
<element name="inst" type="WAT:SunTime" minOccurs="1" maxOccurs="1"/>
<element name="coderet" type="xsd:int" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
</schema>
</types>
<message name="getSuntimeRequest">
<part name="req" type="xsd:string"/>
</message>
<message name="SunTimeStruct">
<part name="inst" type="WAT:SunTime"/>
<part name="coderet" type="xsd:int"/>
</message>
<portType name="ServicePortType">
<operation name="getSuntime">
<documentation>Service definition of function ifg__getSuntime</documentation>
<input message="tns:getSuntimeRequest"/>
<output message="tns:SunTimeStruct"/>
</operation>
</portType>
<binding name="ServiceBinding" type="tns:ServicePortType">
<SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getSuntime">
<SOAP:operation soapAction=""/>
<input>
<SOAP:body use="encoded" namespace="urn:ass" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<SOAP:body use="encoded" namespace="urn:ass" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="Service">
<documentation>gSOAP 2.1.10c generated service definition</documentation>
<port name="ServicePort" binding="tns:ServiceBinding">
<SOAP:address location="http://location/Service.cgi"/>
</port>
</service>
</definitions>Try using the -f:searchschema feature of wscompile when generating the client stubs from your WSDL file.
-
WLS 8.1 JAX-RPC stubs and SSL
I am part of an industry effort to assess WS interop. We have created a common
WSDL that will be implemented in WAS, .NET and WLS 8.1. As part of this effort,
we are also trying to use two-way SSL authentication. However, I have not found
a way to configure WLS 8.1 JAX-RPC Stubs (generated using clientgen utilities)
to present the client certificates. I have a tried a couple of approaches but
neither of them works with the stubs.
First, I tried using the SSLAdapter (as explained in the "Programming Web Services")
documentation. Unfortunately, the service that I am trying to invoke has only
http binding and trying to invoke it using the SSLAdapter throws an exception
complaining that SSL can't be used on non-https binding.
I tried to try another approach. In this, I tried to invoke https: URL for the
web service instead of using the Adapter. However, in this case, I am getting
a peer certificate not presented exception. Everything that I have checked in
adding a client private key and trusted certificates utilize SSLSocketFactory
(& SSLContext) or HttpsURLConnection objects.
At this point, I have ran out of ideas on how to add SSL to the generated client
stubs to tell the generated StubImpl or ServiceImpl implementations to use a different
SocketFactory or connection. There may be some other global class or property
to set these things up, but I am not aware of those. The server side SSL configuration
seems to working fine, as the requests with SSL configuration of "Request Client
certificate but don't enforce it' seems to work fine.
Any responses and suggestions are greatly appreciated.
Thanks
RajDid you check out :
http://webservice.bea.com/
There is a 2 way SSL example here:
http://webservice.bea.com/SSL2way.zip
HTHs.
http://manojc.com
"Seshadri Rajagopal" <[email protected]> wrote in message
news:3ec24d41$[email protected]..
>
I am part of an industry effort to assess WS interop. We have created acommon
WSDL that will be implemented in WAS, .NET and WLS 8.1. As part of thiseffort,
we are also trying to use two-way SSL authentication. However, I have notfound
a way to configure WLS 8.1 JAX-RPC Stubs (generated using clientgenutilities)
to present the client certificates. I have a tried a couple of approachesbut
neither of them works with the stubs.
First, I tried using the SSLAdapter (as explained in the "Programming WebServices")
documentation. Unfortunately, the service that I am trying to invoke hasonly
http binding and trying to invoke it using the SSLAdapter throws anexception
complaining that SSL can't be used on non-https binding.
I tried to try another approach. In this, I tried to invoke https: URL forthe
web service instead of using the Adapter. However, in this case, I amgetting
a peer certificate not presented exception. Everything that I have checkedin
adding a client private key and trusted certificates utilizeSSLSocketFactory
(& SSLContext) or HttpsURLConnection objects.
At this point, I have ran out of ideas on how to add SSL to the generatedclient
stubs to tell the generated StubImpl or ServiceImpl implementations to usea different
SocketFactory or connection. There may be some other global class orproperty
to set these things up, but I am not aware of those. The server side SSLconfiguration
seems to working fine, as the requests with SSL configuration of "RequestClient
certificate but don't enforce it' seems to work fine.
Any responses and suggestions are greatly appreciated.
Thanks
Raj -
BPM, webservices and complex types
I have a WSDL wich has complext xml types, I create a webservice call in BPM. I get a SOAP fault string
<?xml version="1.0" encoding="UTF-8" ?>
<detail faultString="Unable to find a matching Operation for this remote invocation <ns1:createProduct xmlns:ns1="java:com.screwfix.xml.product">
<ns1:description>From BPM</ns1:description>
</ns1:createProduct>. Please check your operation name. " faultCode="Client">
</detail>
I can access the webservice externally but not through BPM. I can access webserivice without complex types, such as simple string....
Looking at the error, it indicates that the soap client cannot process the request. Any ideas would be appreciated, we are using ALBPM 5.7
Full exception :
<?xml version="1.0" encoding="UTF-8" ?>
<detail faultString="Unable to find a matching Operation for this remote invocation <ns1:createProduct xmlns:ns1="java:com.screwfix.xml.product">
<ns1:description>From BPM</ns1:description>
</ns1:createProduct>. Please check your operation name. " faultCode="Client">
</detail>
fuego.soaptype.SoapExecutionException: <?xml version="1.0" encoding="UTF-8" ?>
<detail faultString="Unable to find a matching Operation for this remote invocation <ns1:createProduct xmlns:ns1="java:com.screwfix.xml.product">
<ns1:description>From BPM</ns1:description>
</ns1:createProduct>. Please check your operation name. " faultCode="Client">
</detail>
at fuego.soaptype.SoapCall.processRemoteException(SoapCall.java:531)
at fuego.soaptype.SoapCall.invoke(SoapCall.java:292)
at fuego.soaptype.SoapObject.invoke(SoapObject.java:272)
at fuego.lang.Invokeable.invokeImpl(Invokeable.java:220)
at fuego.lang.Invokeable.invoke(Invokeable.java:161)
at fuego.compiler.Invoke$MethodCall.run(Invoke.java:1543)
at fuego.compiler.Invoke.runCall(Invoke.java:710)
at fuego.compiler.Invoke.run(Invoke.java:694)
at fuego.compiler.Block.run(Block.java:317)
at fuego.compiler.DoBlock.run(DoBlock.java:676)
at fuego.compiler.Method.run(Method.java:1223)
at fuego.compiler.Method$Adaptor.run(Method.java:1894)
at fuego.compiler.FuegoInvokeable.invoke(FuegoInvokeable.java:426)
at fuego.compiler.CodeRunner$DebuggerRunnable.runMethod(CodeRunner.java:756)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1478)
at fuego.lang.JavaObject.invoke(JavaObject.java:185)
at fuego.component.Message.process(Message.java:585)
at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:759)
at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:734)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:140)
at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:132)
at fuego.compiler.DebuggerPrincipal.processBatch(DebuggerPrincipal.java:62)
at fuego.component.ExecutionThread.work(ExecutionThread.java:818)
at fuego.component.ExecutionThread.run(ExecutionThread.java:397)
Edited by masoodmjan at 06/19/2007 9:01 AMI found out that the retrieve method accepts columnSet as a
class and id as a class. These are not strings that you can pass
into MSCRM 3.0. However, I have no idea how to create a .NET
acceptable class and pass it in. If you figured this out, or if
others have thoughts, I'd love to hear how you've gone about it.
Thank you! -
JAX-RPC ArrayLists and Jave Beans
Can any one tell me if JAX-RPC supports an ArrayList of JavaBeans
In my experience, Apache Axis is capable of serializing and deserializing any java.util.Collection instance, provided it can serialize and deserialize the objects held by the collection. This means that a List populated with beans should cause no problems.
A word of caution though: XML serialization of objects is nowhere near as fast as the 'usual' Java serialization. This means that -if you're sending or receiving large amounts of beans per call- you might consider sending and receiving the List as attachment (ie: binary). I realize this defeats interoperability for the related web service methods, but having your users wait dozens of seconds on responses is rarely a viable alternative. -
Hi, I am creating a web service based on a java method that returns a Java bean. This is translated into a complex type in the wsdl containing the beans member variables. During this generation JDeveloper names the complex type as package structure + javabean class name. Is there anyway to change this to just javabean class name ? Secondly is there any way to change the case of the complex type element names (so the initial character is upper case)? I realise that in an ideal world what JDev generates would be OK but I have to meet a spec produced by someone else.
Thanks for any help.Does anyone have any experience with this ?
-
Web Service invocation and Complex Types (java TO's)
I am trying to call a java service from ColdFusion MX 8.0.1 using the following code.
I am the developer of the Java service, not a coldfusion programmer.
<cfscript>
ws = CreateObject("WebService", "http://myserver.us/webservices/WebInterface?WSDL");
vali = CreateObject("Java","vo.myapplication.ContactVO");
vali.setId(1234);
vali.setSecondaryID(45855);
wsResponse = ws.updateContact(vali);
</cfscript>
The call fails with "Object Instantiation Exception - Class not found: vo.myapplication.ContactVO", so i know CF is unable to load my class.
My question is why?
My stubs have been generated into
C:\jrun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\stubs\WS-254617805
and i can see ContactVO in there, in the correct package.
I can make it work if i add the absolute path of the sub directory to
Server Settings > Java and JVM > ColdFusion Class Path
Can anyone tell me why Coldfusion 8.0.1 is not dynamically loading the VO class, so that i can perform a CreateObject?
Thanks in advance!Another way to dynamically load a custom class like /vo/myapplication/ContactVO.class, besides specifying its path in the classpath, is to place it in the directory {CF_wwwroot}/WEB_INF/classes/. Mind you, I'm on the Coldfusion single-server version, on Windows.
-
Bean:write and complex types
I have a Java object like that:
public class OBJ1 {
String name;
String id;
OBJ2 [] Array_OBJ2;
// getters and setters methods for name,id and Array_OBJ2
OBJ2 is an an object like this:
public class OBJ2 {
String surname;
OBJ3 [] Array_OBJ3;
// getters and setters methods for surname and Array_OBJ3
And OBJ3 is like this:
public class OBJ3 {
String control;
// getters and setters methods for control
I passed a OBJ1 object to a jsp page and I can access to "name" and "id" properties successfully, but I have problems to access to the "Array_OBJ2" object.
What's the correct syntax in the jsp page to access it in a bean:write tag ?Hi
I am not sure just thinking and guessing try this.......
<logic:iterate name="OBJ1" id="item" property="Array_OBJ2">
<bean:write name="item" />
</logic:iterate>do reply wheather it works or not -
Hello
I was trying to do a JAX-RPC application, and I had some problems with type casting. My application worked fine with primitive types, vectors of primitive types, and beans with primitive type properties. But it didn't work with vectors of beans, or ArrayList's of beans... It couldn't deserialize the result on client side... Can anyone help?
The Java Web Services Tutorial says that JAX-RPC supports beans and vectors, but I had the impression that this is not a "recursive" support, like "beans with vectors" or "vectors of beans"... Does it make sense?
By the way, I was using a DII client...
Thanks,
Alexandre MurakamiHello!
Thanks for the reply! I can't put the code of my application here (because it's quite big and it's from work)... But I followed the dii client example from the Web Services Tutorial...
I'm trying to do a kind of a general client... The parameters are the URL of the service, the name of the operation, a list of parameters and the return type class.. And it takes the rest of the service information from the WSDL file... About the return type, I take the QName of the return type from the WSDL:
<message>
<part name="result" type="...">...
then I call the call.setReturnType(QName, Class) method. The return type was an array of a very simple bean, something like:
class Person {
String name;
int age;
public String getName() {...}
public void setName(...) {...}
public int getAge() {...}
public void setAge(...) {...}
I don't know if the information I put here is enough... but anyway, thanks for the reply!
Alexandre Murakami -
JAX-RPC: Web service where both server /and/ client are services?
I'm considering a two-way Web service in an application that I'm designing and would appreciate any insight from prior experience.
This will be a standard client-server application, where the server broadcasts messages and the client, in turn, can request further information about the messages that it receives (think RSS-style updates, but with more interaction). [strong]However[strong], instead of having the client poll the server for new messages, I'd like to have the client register itself with the server as a message listener. The server is currently implemented as a Web service on port X. I'd like the client to register itself with the server, and then receive messages on port Y.
I'm considering a design like the following (note the directions of the inheritance arrows):
( Server class ) --<-- ( RemoteServerImpl class ) -->-- / RemoteServer interface /
|
( Listener class ) --<-- ( RemoteListenerImpl class ) -->-- / RemoteListener interface /Some considerations:
* In both cases, the client and server are broken out into an interface and two classes. The non-Remote classes implement all of the functionality. The RemoteX interfaces declare the methods that will be exposed via RPC, and the RemoteXImpl classes are empty subclasses of the non-Remote classes.
* In order to register itself with the Server, the Listener must be passed in as a method parameter, and thus conform to the JAX-RPC specification for value types. However, value types can't implement java.rmi.Remote.
* Only the Server and Listener know anything about each other.
* This application can be run either remotely or locally, depending on how the Server and Listener are instantiated. For the latter, they're instantiated directly and the listener is registered with the Server. For the latter, the RemoteX interfaces will point to the service stubs.
* I don't see an easy way to allow both the Server and the Listener to have references to each other (at least now without some casting magic), since one of them will have to conform to the value type specification, which requires that all of its fields must be valid JAX-RPC types.
I've got the Server portions implemented and working, and am now going to turn to the Listener stuff. Can anybody see a fundamental problem with this design, or can suggest something better?Hi There,
Because web services are fundamentally a Services-oriented architecture, and not an Object-oriented one, you are unable to pass objects by reference (only by value) hence the design decision to not allow rmi.Remote objects to be sent across the wire. The best way would be to abstract an object which does itself not represent a server, but a route to a server (lets call it ServerPointer). This must contain address, port, service info, etc.
Now, in your Server class, create a factory method which takes a ServerPointer, and returns a reference to a
remote server, e.g. protected Server createServer( ServerPointer p ) (using the necessary APIs to get such a reference)
Hope this helps... -
JAX RPC extension: Problem with document/literal and MyType[]
Hi,
I have installed the JAX RPC extension and want to generate a stub from my WSDL file. The WSDL describes a document/literal binding.
Problem:
A webservice server method like:
public wineshop.model.common.SimpleProducer[] getSimpleProducerList() throws RemoteException;
is translated into a stub method like:
public UnknownType getSimpleProducerList() throws Exception {..}
Is an array of own types with the binding style "document/literal" not supported in JAX RPC 1.4 or is it just a bug?
The WSDL file is generated by JAX RPC 1.4.
I have installed JWSDP-1.5 and generated a stub with wscompile from the WSDL file. The generated stub has the correct method return type:
public wineshop.ws.client.SimpleProducer[] getSimpleProducerList()
throws java.rmi.RemoteException
It there a workaround like replacing some JDev JARs with JWSDP-1.5 to solve the problem?
Any hints are welcome.
Thanks Markusrepost.....
-
WL 8.1 and JAX-RPC 1.1 (JWSDP 1.3) problems
I have developed several web services using Sun's JWSDP 1.3. It deploys just fine
in WebLogic 8.1 and I can view the WSDL, etc. with no problems. I have written
a simple test client to call the service and this is where I get errors.
The server error is:
Apr 14, 2004 9:43:00 AM com.sun.xml.rpc.server.http.JAXRPCServletDelegate doPost
SEVERE: caught throwable
java.lang.NoSuchMethodError: javax.xml.soap.SOAPElement.normalize()V
at com.sun.xml.rpc.streaming.XmlTreeReader.parse(XmlTreeReader.java:129)
at com.sun.xml.rpc.streaming.XmlTreeReader.next(XmlTreeReader.java:100)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextContent(XMLReaderBase.jav
a:24)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextElementContent(XMLReaderB
ase.java:42)
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:
108)
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServle
tDelegate.java:316)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:6
9)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
The client error is:
java.rmi.ServerException: JAXRPC.JAXRPCSERVLET.28: Missing port information
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:372)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:224)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:61)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:339)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:99)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:71)
at $Proxy0.getWorkList(Unknown Source)
at com.workpoint.sample.client.webservices.WorkItemServiceClient.testGetWorkList(WorkItemServiceClient.java:124)
at com.workpoint.sample.client.webservices.WorkItemServiceClient.main(WorkItemServiceClient.java:48)
I have a WAR for the web services that also includes the JAX-RPC, SAAJ, and other
JARs. This WAR is bundled in an EAR with our other applications. Like I said,
everything deploys just fine, it's at runtime the web services don't work. This
configuration (and test client) works with Tomcat, JBoss, OC4J, and WebSphere
with no problems. I've tried a bunch of different things and can't figure out
why it doesn't work with WebLogic.
Thanks for any help on this.
MikeDavid,
I tried your prefer-web-inf-classes and the web services deploy, but i get an
error trying to view the wsdl. sounds like trying to get jax-rpc 1.1 web services
running in weblogic is going to be nothing but problems. anyways, here's the error
i get:
Error 500--Internal Server Error
javax.servlet.ServletException: JAXRPC.JAXRPCSERVLET.35: failed to create a template
object
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doGetDefault(JAXRPCServletDelegate.java:258)
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doGet(JAXRPCServletDelegate.java:102)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doGet(JAXRPCServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
"David Karr" <[email protected]> wrote:
>
This is happening because WLS already contains the JWSDP classes, but
an older
release. The jars in your web applications are not used if other jars
containing
those classes are found first.
Technically, you should be able to set the "prefer-web-inf-classes" parameter
in your weblogic.xml file to make it "prefer" classes found in WEB-INF.
There's
one not very well documented aspect of this that would be a problem for
trying
to override particular classes, but it shouldn't be a problem for your
case. The
issue is that the ClassLoader that ends up being used if you set "prefer-web-inf-classes"
(it might not be a different ClassLoader, but just imbued with modified
behavior)
actually does not allow classes in certain packages to be overridden.
I can't
remember all of the paths, but I do know that anything in "javax.xml.*"
is specifically
ALLOWED to be overridden.
However, when I went down this path a while ago, I ran into other more
obscure
exceptions that i was unable to figure out. I ended up concluding that
using the
JWSDP included with WLS 8.1 was the path of least resistance. I never
did try
altering the global classpath of the appserver to include the jwsdp 1.3
jars to
override the classes in weblogic. This is another alternate approach,
but I have
a feeling that this will cause other unexpected problems.
"Mike" <[email protected]> wrote:
I have developed several web services using Sun's JWSDP 1.3. It deploys
just fine
in WebLogic 8.1 and I can view the WSDL, etc. with no problems. I have
written
a simple test client to call the service and this is where I get errors.
The server error is:
Apr 14, 2004 9:43:00 AM com.sun.xml.rpc.server.http.JAXRPCServletDelegate
doPost
SEVERE: caught throwable
java.lang.NoSuchMethodError: javax.xml.soap.SOAPElement.normalize()V
at com.sun.xml.rpc.streaming.XmlTreeReader.parse(XmlTreeReader.java:129)
at com.sun.xml.rpc.streaming.XmlTreeReader.next(XmlTreeReader.java:100)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextContent(XMLReaderBase.jav
a:24)
at com.sun.xml.rpc.streaming.XMLReaderBase.nextElementContent(XMLReaderB
ase.java:42)
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:
108)
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServle
tDelegate.java:316)
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:6
9)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
The client error is:
java.rmi.ServerException: JAXRPC.JAXRPCSERVLET.28: Missing port information
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:372)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:224)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:61)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:339)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:99)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:71)
at $Proxy0.getWorkList(Unknown Source)
at com.workpoint.sample.client.webservices.WorkItemServiceClient.testGetWorkList(WorkItemServiceClient.java:124)
at com.workpoint.sample.client.webservices.WorkItemServiceClient.main(WorkItemServiceClient.java:48)
I have a WAR for the web services that also includes the JAX-RPC, SAAJ,
and other
JARs. This WAR is bundled in an EAR with our other applications. Like
I said,
everything deploys just fine, it's at runtime the web services don't
work. This
configuration (and test client) works with Tomcat, JBoss, OC4J, andWebSphere
with no problems. I've tried a bunch of different things and can't figure
out
why it doesn't work with WebLogic.
Thanks for any help on this.
Mike -
Hi all,
I have created a jax-rpc console app which works fine. (its a fairly simple online shop application). I would like to try and implement it via jsp but have never used jsp before.
I've tried to follow the coffee-bean example, but the jsp has confused the hell out of me. (getting the cb app to run is fine, but separating out the jax-rpc element is a nightmare, what with the taglibs, build files and all). Despite my best efforts, I have failed to get a simple jsp/jax-rpc page to work.
In so far as I can tell, it requires two builds to install the jax-rpc service, and another build to install the jsp service on the tomcat server. Is this correct?
It would be much appreciated if anyone could post a simple example of how to get a basic jsp/jax-rpc service to work. A simple hello world would be just fine! :)
I know I could figure out jsp alone. Thats not really the problem. Its incorporating the jax-rpc service that is killing me! All comments and suggestions are very welcome.
//Daniel.Hi all,
I have created a jax-rpc console app which works fine.
(its a fairly simple online shop application). I would
like to try and implement it via jsp but have never
used jsp before.I suggest you invest some time in learning how to work with JSP technology. Usually JSP pages call JavaBeans or EJB components to do the work.
>
I've tried to follow the coffee-bean example, but the
jsp has confused the hell out of me. (getting the cb
app to run is fine, but separating out the jax-rpc
element is a nightmare, what with the taglibs, build
files and all). Despite my best efforts, I have failed
to get a simple jsp/jax-rpc page to work.The Coffee Break application has two JavaBeans components that do the work of calling the JAX-RPC service: RetailPriceList and CheckoutFormBean.
>
In so far as I can tell, it requires two builds to
install the jax-rpc service, and another build to
install the jsp service on the tomcat server. Is this
correct?What do you mean by build? To create a JAX-RPC service you have to generate files with tools, compile those files, package into a WAR, and then deploy.
The web application containing the JSP pages and compiled JavaBeans components is packaged into another WAR and deployed separately.
>
It would be much appreciated if anyone could post a
simple example of how to get a basic jsp/jax-rpc
service to work. A simple hello world would be just
fine! :)
I know I could figure out jsp alone. Thats not really
the problem. Its incorporating the jax-rpc service
that is killing me! All comments and suggestions are
very welcome.We'll take your comments into account for the next version of the Java Web Services Tutorial.
Maybe you are looking for
-
IC WEBCLIENT: Access via 'NULL' object reference not possible
Hi, Iam working in ABAP, and learning CRM ABAP on CRM5.0 IDES Demo system I was trying to create a new WebIC by copying one view from CRM_IC to ZCRM_IC bsp application. Following are the steps I following according to Cook book documentation. 1. I co
-
How do I open a word doc using Pages?
I am new to Macs and I have no idea how to open a word document in Pages. I really do not want to keep Windows or Word on the mac so if there is any way to keep Windows off my computer please help.
-
ONLY screen blending mode doesn't work...?
I have Windows 8, and Photoshop CS6. All of my blending modes work, except for Screen. I don't know why it doesn't, but I do use it somewhat frequently, and it's really holding me back at this point. Is this related to all the other problems people h
-
Regarding BADI FAA_EE_CUSTOMER
Hi Gurus, I have a requirement of BADI FAA_EE_CUSTOMER ( new depreciatioin calculation ), the thing is i am new to BADIs, i have created the BADI Z_FAA_EE_CUSTOMER and inserted a break-point in the set_base_value interface. but i am unable to find th
-
Groups and their users - please explain
User "alex" $ groups disk wheel log network audio optical storage users So it's in "users" group. $ cat /etc/group | grep alex disk:x:6:root,alex wheel:x:10:root,alex log:x:19:root,alex network:x:90:alex audio:x:92:alex optical:x:93:hal,alex storage: