Simple WebService Client -Getting "No appid found in Header section of SOAP
Wrote a simple webservice static client code using JWSDP-1.4.
Generated and compiled the code using jaxrpc's wscompile utility.
When I ran this program I am getting the belwo error. Any help in this would be greatly appreciated.
[java] javax.xml.rpc.soap.SOAPFaultException: No appid found in Header section of SOAP Request Message
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:478)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294)
[java] at com.verizon.vericheck.ikey.GetSunsetConversionData_Stub.getConvData(GetSunsetConversionData_Stub.java:69)
[java] at com.verizon.vericheck.ikey.IkeyStaticStub.main(IkeyStaticStub.java:64)Thanks,
Bala
Wrote a simple webservice static client code using JWSDP-1.4.
Generated and compiled the code using jaxrpc's wscompile utility.
When I ran this program I am getting the belwo error. Any help in this would be greatly appreciated.
[java] javax.xml.rpc.soap.SOAPFaultException: No appid found in Header section of SOAP Request Message
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:478)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294)
[java] at com.verizon.vericheck.ikey.GetSunsetConversionData_Stub.getConvData(GetSunsetConversionData_Stub.java:69)
[java] at com.verizon.vericheck.ikey.IkeyStaticStub.main(IkeyStaticStub.java:64)Thanks,
Bala
Similar Messages
-
Weblogic 9.2 webservice client getting ClassCastException XmlTokenImpl
Hi,
I have written a webservice using the JAX-WS notation and Weblogic 9.2 MP3 libraries. I generated the server using jwsc and the client using clientgen. The server is working fine. But whenever I used the generated client stubs, I am getting this error:
java.lang.ExceptionInInitializerError
at weblogic.wsee.ws.init.WsDeploymentChain.newClientChain(WsDeploymentChain.java:24)
at weblogic.wsee.ws.WsFactory.callClientListeners(WsFactory.java:108)
at weblogic.wsee.ws.WsFactory.createClientService(WsFactory.java:46)
at weblogic.wsee.jaxrpc.ServiceImpl.init(ServiceImpl.java:143)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:111)
at sdo.client.SDOService_Impl.<init>(SDOService_Impl.java:21)
at sdo.client.SDOService_Impl.<init>(SDOService_Impl.java:17)
Caused by: java.lang.ClassCastException: com.bea.xbean.values.XmlTokenImpl
at weblogic.wsee.ws.init.WsConfigFactory.getDeploymentListenerConfig(WsConfigFactory.java:133)
at weblogic.wsee.ws.init.WsConfigFactory.load(WsConfigFactory.java:93)
at weblogic.wsee.ws.init.WsConfigFactory.newInstance(WsConfigFactory.java:45)
at weblogic.wsee.ws.init.WsConfigFactory.newInstance(WsConfigFactory.java:34)
at weblogic.wsee.ws.init.WsConfigManager.<clinit>(WsConfigManager.java:8)
... 54 more
I spent lots of time debugging this and I found that this exception was generated when weblogic/xbean is trying to parse the listener-class in wsee-config.xml:
<wsee:listener-class>weblogic.wsee.policy.deployment.ClientPolicyDeploymentListener</wsee:listener-class>
For some reason, this got converted to an XmlTokenImpl object and the code was trying to cast it to com.sun.java.xml.ns.j2Ee.FullyQualifiedClassType. I don't know why it wasn't converted to the right class. But I noticed that the wseeConfig.xsd has this:
<import namespace="http://java.sun.com/xml/ns/j2ee" schemaLocation="../../../../j2ee/descriptor/schemas/j2ee14/j2ee_1_4.xsd"/>
Could it be that this "../../../../j2ee/descriptor/schemas/j2ee14/j2ee_1_4.xsd" is causing some issue?
I had checked, double checked and triple checked my classpath and the jars I am using. I am using the weblogic.jar, xbean.jar, weblogic-container-binding.jar all from the Weblogic 9.2 MP3 server installation.
Anyone has any idea on how to solve this? I am very stuck!Yes. I am using the 9.2 webservices. This is a new webservice I'm creating. The ant build.xml file to generate it is like this:
<jwsc srcdir="${SRCDIR}/src" destdir="${EXPDIR}/webservice"
tempdir="${WRKDIR}/webservice"
verbose="on" debug="on"
enableAsyncService="false"
classpathref="our.custom.classpath" keepGenerated="true">
<jws file="sdo/webservice/impl/SDOWSImpl.java"
contextPath="SDO" name="SDOService">
<WLHttpTransport contextPath="SDO"
serviceUri="SDOService"
portName="SDOService"/>
</jws>
</jwsc>
The our.custom.classpath is as follows:
<path id="our.custom.classpath">
<pathelement location="${EXPTOP}/log4j/1.29/lib/log4j.jar"/>
<pathelement location="${EXPTOP}/weblogic/9.23/lib/apache_xbean.jar"/>
<pathelement location="${EXPTOP}/weblogic/9.23/lib/xbean.jar"/>
<pathelement location="${EXPTOP}/weblogic/9.23/lib/weblogic.jar"/>
<pathelement location="${EXPTOP}/weblogic/9.23/lib/wsse.jar"/>
</path>
I have to include xbean.jar here because if I didn't, I got "java.lang.NoClassDefFoundError: com/bea/xml/XmlException" during the ant build.
How do I make sure I use the 9.2 style xbeans?
thanks! -
WebService Client - how to enable HTTP Compression
Hi
I have written a simple WebService Client. The WebService expects that the WebService clients enable HTTP compression. This is the exact text from the docs:-
""1. Client should be HTTP Compression enabled
HTTP Compression had been made mandatory for API�s. Thus API�s client should
include �Accept-Encoding: zip� header as part of request and should be able to
handle compressed data. Please note that system will send an error message if client
are not http compression enabled saying client should be compression enabled."
I do not know how to enable HTTP compression in the WebService Client. The method called is "GetInstantaneousFlowData". It accepts no arguments and returns xsd:datetime.
The wsdl can be found at:-
http://energywatch.natgrid.co.uk/EDP-PublicUI/PublicPI/InstantaneousFlowWebService.asmx?WSDL
Can someone please help :-
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;
import java.util.Calendar;
public class TestNGPubTime4 {
public static void main(String[] args) throws Exception {
// Setup the global JAX-RPC service factory
System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
// create service factory
ServiceFactory factory = ServiceFactory.newInstance();
// define qnames
String targetNamespace = "http://www.NationalGrid.com/EDP/BusinessEntities/Public/";
QName serviceName = new QName(targetNamespace, "InstantaneousFlowWebService");
QName portName = new QName(targetNamespace, "InstantaneousFlowWebServiceSoap");
QName operationName = new QName("http://www.NationalGrid.com/EDP/UI/GetInstantaneousFlowData",
"GetLatestPublicationTime");
// create service
Service service = factory.createService(serviceName);
// create call
Call call = service.createCall();
// set port and operation name
call.setPortTypeName(portName);
call.setOperationName(operationName); // add parameters
call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://www.NationalGrid.com/EDP/UI/GetInstantaneousFlowData");
// call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "http://schemas.xmlsoap.org/soap/encoding/");
call.setReturnType(new QName( "http://www.w3.org/2001/XMLSchema","datetime") );
// set end point address : soap address location
call.setTargetEndpointAddress("http://energywatch.natgrid.co.uk/EDP-PublicUI/PublicPI/InstantaneousFlowWebService.asmx");
// invoke the remote web service
Calendar result = (Calendar) call.invoke(new Object[] {});
System.out.println("result=" + result);
}Rishika,
Thanks for your reply.
Could I get clariffication on some more thing?
I am using Axis 1.4 version. And I am able to implement the gzip while doing the following steps.
1) Change the pivote value to CommonsHTTpSender.
<transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>
2) public class RetreiveReservationsSOAPBindingStubLocal extends RetreiveReservationsSOAPBindingStub.
I Override the method to support GZIP.
org.apache.axis.client.Call _call = super.createCall();
call.setOperation(operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("retreiveReservations");
_call.setEncodingStyle(null);
call.setProperty(org.apache.axis.client.Call.SENDTYPE_ATTR, Boolean.FALSE);
call.setProperty(org.apache.axis.AxisEngine.PROPDOMULTIREFS, Boolean.FALSE);
call.setProperty(HTTPConstants.MCACCEPT_GZIP, Boolean.TRUE);
call.setProperty(HTTPConstants.MCGZIP_REQUEST, Boolean.TRUE);
call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("", "retreiveReservations"));
super.setRequestHeaders(_call);
super.setAttachments(_call);
Object resp = call.invoke(new Object[] {retreiveReservationsRequest});
I am able to send and receive the request and response in gzip encoded format.
Now my clarrification is,
Is it possible to set the piote value to CommonsHTTPSender for the transport http through my code?
How could I set the values from code?
Reason is, I don't want to manually edit the axis 1.4's client-config.wsdd
Since this is very critical thing, please please help me.
Thanks in advance.
Regards,
Nishad Ponery -
Handling cookies in a WebService Client
Hi,
I've written the following code for a simple webservice client and everything work fine.
Additionally, I have to read a Cookie from the HTTPHeader of the first response and put it into the
HTTPHeader of the next requests. What is the best practice to implement
this task?
My service is a Weblogic WebService on Weblogic 8.1 sp5.
Thanks in advance
Wahid
public class ClientTest {
public static void main(String[] args) throws Exception {
System.setProperty("javax.xml.rpc.ServiceFactory",
"weblogic.webservice.core.rpc.ServiceFactoryImpl");
ServiceFactory factory = ServiceFactory.newInstance();
String targetNamespace = "http://www.mycomp.de/namespace";
QName serviceName = new QName(targetNamespace, "MyService");
QName operationName = new QName(targetNamespace, "testConnection");
Service service = factory.createService(serviceName);
TypeMappingRegistry registry = service.getTypeMappingRegistry();
TypeMapping mapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING);
mapping.register(VerbindungstestVO.class,
new QName(targetNamespace, "TestConnectionVO"),
new TestConnectionCodec(),
new TestConnectionCodec());
Call call = service.createCall();
call.setOperationName(operationName);
call.addParameter("request", new QName(targetNamespace, "TestConnectionVO"), ParameterMode.IN);
call.setReturnType(new QName(targetNamespace, "TestConnectionVO"));
call.setTargetEndpointAddress("http://localhost:7001/my-ws/MyService");
TestConnectionVO vo = new TestConnectionVO();
vo.setPing("3");
TestConnectionVO res = (TestConnectionVO) call.invoke(new Object[] {vo});
System.out.println(res);
}quote:
Originally posted by:
MartinW-2006
Any suggestions? AM I right in presuming this is a bug?
Start by ensuring that your function actually runs when you
invoke it. Does anything get returned to your calling template? -
Hey ,
I have an application which requires to talk to 2 different published webservices
from 2 different systems. Now instead od designing static webservice clients for
each of these systems(which would involve having separate proxy jars etc),
I am planning to design a dynamic webservice locator and invoker....
I know that we can have webservice clients which are dynamic to the extent that
we can create proxy objects at runtime once we know the endpoint WSDL..
eg:
ServiceFactory factory = ServiceFactory.newInstance();
QName serviceName =new QName targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
QName portName = new QName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
QName operationName = new QName("urn:xmethods-delayed-quotes","getQuote");
URL wsdlLocation = new URL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
// create service
Service service = factory.createService(wsdlLocation, serviceName);
// create call Call call = service.createCall(portName, operationName);
My question on this...if I have a dynamic approach like the above what are the
pros and cons..I guess it would surely have more overhead compared to a static
client...?
Secondly ,is it even feasible to design a dynamic client in such a way that the
endpoint WSDL could also be an unknown and my generic client would also locate
the end-point dynamically and then invoke dynamic calls as above...
If anybody can share their insights on a dynamic webservice client , I would really
appreciate it...
Thanx,
Krish
KRISH.VENKATARAMAN
Senior Technology Analyst
Bank of America Corp.
Email:[email protected]Hi Krish,
In WSDL, the data types passed between applications are described in schema
and
this is key for interop. I dont know of any standard/natural mapping for
values types,
object reference, etc in a binary protocol (like JRMP, IIOP) to schema. For
eg:
say there is serializable object Foo, which is the argument to a remote
method in RMI.
Object Foo can have data + behavior. It may be possible (not always, i
think) to
describe the data in Foo as schema, but how can one describe the behavior?
So, if WSDL is the only contract between the server and client (key
requirement
for interop), then IMHO RMI can not be described by WSDL.
Also, WSDL was designed for future extensions and does not map well to a
programming API. WSIF trys to expose all the gory WSDL details and its apis
are very clumsy.
These were the two main reason to vote it down at JAX-RPC EC.
I am attaching an example that shows, how to introspect WSDL and invoke
a method using JAX-RPC (with little extension to the std api). Also, it
shows
how to handle complex type without data binding. Will this solve your
problem?
I am very interested to get your feedback on this.
BTW, This example will only work with WLS 8.1.
regards,
-manoj
"Krish Venkataraman" <[email protected]> wrote in message
news:[email protected]...
>
>
Mike...thanx for the inputs...
As per ur suggestion...I have taken this offline and mailed u [email protected]
also....lemme know if thatz cool...
there are my observations..lemme know what am i missing..
1) The main difference I see between JAX-RPC and WSIF, is that with WSIFclient
it is easier to port to services talking
via other ports like RMI,IIOP etc...where as JAX-RPC is understandsonly SOAP(atleast
for now).
2) Lets assume for the time-being that I would be interested only to talkto services
talking SOAP.
Then why do I need WSIF ?
3) I can have a JX-RPC client , I can have a similar generic(reflection)code
for built-in/primitive datatypes and for
complex datatypes I anywayz would be doing the same thing(requiringthe java
representation of the datatype unless I use
something like JROM or something which I do not want to) in JAX-RPC orWSIF.
>
4) As far as syncronous or asyncronous invocation is concerned , myunderstanding
is that my client call is going to remain the
same ..the service provider is going to either use message-oriented orRPC
on his side...
Again assuming that I am interested only with services talking SOAP, thiscould
be my generic client invocation design
Background is that my client is going to run from within a WLS70sp1
Actors:
a) webSevice1ClientSessionBean : This will be a stateless session beanwhich might
have knowledge about webSevice1's end-point ,
complex dataTypes if any.
(There would be other session beans like this which would haveknowledge about
other specific webservice)
b) GenericWebServiceInvoker : This will have knowledge about everythingwithin
the webservice-standards/protocols.
eg:
//set weblogic ServiceFactory
System.setProperty( "javax.xml.rpc.ServiceFactory",
"weblogic.webservice.core.rpc.ServiceFactoryImpl" );
//create service factory
ServiceFactory factory = ServiceFactory.newInstance();
//define qnames
String targetNamespace = "http://soapinterop.org/";
QName serviceName = new QName( targetNamespace, "SimpleTest" );
QName portName = new QName( targetNamespace, "SimpleTestSoap" );
QName operationName = new QName( "http://soapinterop.org/",
"echoStruct" );
//create service
Service service = factory.createService( serviceName );
TypeMappingRegistry registry = service.getTypeMappingRegistry();
TypeMapping mapping = registry.getTypeMapping(
SOAPConstants.URI_NS_SOAP_ENCODING );
mapping.register( SOAPElement.class,
new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
new SOAPElementCodec(),
new SOAPElementCodec() );
//create call
Call call = service.createCall();
//set port and operation name
call.setPortTypeName( portName );
call.setOperationName( operationName );
call.addParameter( "inputStruct",
new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
ParameterMode.IN);
All parameter values specific to a particular webservice likeQName,targetNameSpace
etc will be sent to this invoker by
webSevice1ClientSessionBean. The GenericWebServiceInvoker will invokethe
service
(using reflection for primitive/builtin types) and alwayz accept anobject
from the service operation and just return
that "object" back the webSevice1ClientSessionBean.ThewebSevice1ClientSessionBean
will know how to interpret the
complexdataType or builtInDatatype whichever is returned.TheGenericWebServiceInvoker
will not have any application
specific knowledge...it will just have knowledge about how todiscover, invoke
any SOAP webservice...
Somewhere in the beginning of GenericWebServiceInvoker I will use JAXRto
discover services from UDDI if needed.
This way I will have a generic webservice client invocation frameworkwhich
can invoke any service which talks SOAP.
Now lemme know how the above picture looks and what is missing...
I have some questions :
1) Incase of complex dataTypes, I will have itz XML representation inthe
publisher's WSDL and the publisher will give
me the java representation of the complex dataType.But how does myclient
JAX-RPC know how to map the XML
to the java representation unless I specify the mapping somewhere?Does
the TypeMapping/TypeMappingRegistry do this ?
Thanx,
Krish
"Michael Wooten" <[email protected]> wrote:
You know, it's really cool to hear guys thinking things through, before
they "jump
on a bandwagon" :-)
Anyway, I suspect that the performance overhead of doing reflection,
and heavy
server-side code intrusion, is what has made a lot of developers balk
at using
WSIF. I would check out the IBM newsgroups, to see what the general
developer
sentiment is on WSIF.
To achieve any sort of decent performance with JAX-RPC based webservices,
you
need to do a fair amount of optimization/tuning on both the client and
server
side. I recommend setting up your own "lab environment" for doing these,
so you
can see exactly what's making things improve/degrade. If you are really
interested
in this topic, we should talk about it "off-line".
In general, the more "dynamic" things are on the client side, the slower
things
will be, the more you really need to question if you really need them
to be dynamic
:-) Does making it "dynamic" really offer something that you can't get
from a
"static" version? If not, who's really benefiting here. I mean, com'n.
All you
really want to do is invoke an operation, right? By the time you get
all the information
it takes to do a dynamic invocation (i.e. port, target namespace, data
type for
input argument, serializer/deserializer for each non-built-in data type,
etc.),
your client looks like you are trying to boot a PDP-11! LOL! For those
of you
who don't know what a PDP-11 is, it's an early computer (from the'60-'70),
that
you actually had to use switches to create the "binary instructions"
to boot it
up!
From a PM's (product manager's) perpective, I wouldn't even let thedevelopers
modify "working" EJBs to expose them as a web service. Alarm bells should
go off
in your head, if you have to modify existing server-side code to expose
a company
asset as a web service.
Response to OT comment: WebLogic Server 7.0 uses its own implementation
of JAX-RPC
1.0. This implementation, I've been told by one of the BEA engineering
that worked
on it, has been certified to be JAX-RPC compliant by Sun. Don't know
about Apache
Axis, in this regard. I use both Apache Axis and the JWSDP with WLS 6.1,
but I
haven't really spent a lot of time looking for differences between our
(BEA's)
implementation, and theirs.
Regards,
Mike Wooten
"Krish Venkataraman" <[email protected]> wrote:
Hey Mike ...
I hear ya..and I see the significance of WSIF...but that IBM started
it a year
back and itz not yet stabilized is what is holding me back...
U mite have a better hold of what WSIF can do...whatever I could grasp
from yesterday
is this...
a)It reads meta data from the wsdl and using a reflection mechanismcalls
the
service operations...
I see examples with primitive datatypes..but what happens when
complex/custom
datatypes come into play...
Would the client code differ between synchronous invocation toasynchronous
invocation...
And aleast in the samples for the WSIF distribution for connectors like
EJB/JMS
etc, the code does not look generic anymore..there are specific calls
to operations
and parameters...
Also Mike , what is the trade-off on performance between having adynamic
client(lets
say based on WSIF)or having a static client...the extent of reflection
a dynamic
client will have to do and create SAAJ objects at runtime will beenormous..
Also I know that there is a relevant API...but can u give an examleshowing
me
how I could discover services from UDDI ..?
Out of this current topic...does BEA use itz own implementation of SOAP
in itz
webservice implementation...and how does it compare with AXIS ?
Thanx,
Krish
"Michael Wooten" <[email protected]> wrote:
Hi Krish,
Well, I guess that's how things are when "needed functionality exceeds
the current
state of a technology" :-)
I (not necessarily BEA) look at it like way:
1. IBM co-authored the "Big 3" XML grammars for the current web
services
stack.
2. IBM always appears to be "there, somewhere" in the new crop ofproposed
additional
XML grammars for "partially agreed upon extension layers", for theweb
services
stack.
3. IBM donated it's original SOAP implementation to the open-sourcecommunity.
4. IBM came up with WSIF over a year ago.
5. IBM's WSTK uses the Apache Axis stuff.
6. A lot of the JAX-RPC/JAXM API is based on the Apache SOAP and Apache
Axis implementations.
7. It looks like IBM may have donated WSIF to Axis.
8. You appear to need something like WSIF :-)
So, there's probably at least a 60/40 chance that some WSIF-like thing
will make
it into the JWSDP, right? If you want "higher odds", you should talk
to the folks
working on the JWSDP, as they are somewhat "in charge" here :-)
Regards,
Mike Wooten
"Krish Venkataraman" <[email protected]> wrote:
Yes...I am surely lookin at something similar...but that framework
not
being standardized
scares me as I have seen many good ideas not seeing the light of the
day...and
I do not want to design something using a framework which might remain
un-standardized..
what are ur thots..
Thanx,
Krish
"Michael Wooten" <[email protected]> wrote:
Hi Krish,
It sounds like you want WSIF :-)
"WSIF allows stubless or completely dynamic invocation of a Web
service,
>>>>>>
based upon examination of the meta-data about the service at runtime.
It
also allows updated implementations of a binding to be plugged intoWSIF
at
runtime, and it allows the calling service to defer choosing a
binding
until
runtime."
Correct?
This is a relatively new "unofficial" addition to the Web ServicesStack,
so it
is not in WLS 7.0 (or Sun's JWSDP) yet. See the following link formore
details:
http://xml.apache.org/axis/wsif
Regards,
Mike Wooten
"Krish Venkataraman" <[email protected]> wrote:
Hey ,
I have an application which requires to talk to 2 different
published
webservices
from 2 different systems. Now instead od designing static webservice
clients for
each of these systems(which would involve having separate proxyjars
etc),
I am planning to design a dynamic webservice locator and invoker....
I know that we can have webservice clients which are dynamic tothe
extent
that
we can create proxy objects at runtime once we know the endpoint
WSDL..
eg:
ServiceFactory factory = ServiceFactory.newInstance();
QName serviceName =new QName
targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
>>>>>>>
QName portName = newQName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
>>>>>>>
QName operationName = newQName("urn:xmethods-delayed-quotes","getQuote");
>>>>>>>
URL wsdlLocation = newURL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
>>>>>>>
// create service
Service service = factory.createService(wsdlLocation, serviceName);
// create call Call call = service.createCall(portName,
operationName);
>>>>>>>
>>>>>>>
My question on this...if I have a dynamic approach like the abovewhat
are the
pros and cons..I guess it would surely have more overhead comparedto
a static
client...?
Secondly ,is it even feasible to design a dynamic client in such
a
way
that the
endpoint WSDL could also be an unknown and my generic client wouldalso
locate
the end-point dynamically and then invoke dynamic calls as above...
If anybody can share their insights on a dynamic webservice client
I would really
appreciate it...
Thanx,
Krish
KRISH.VENKATARAMAN
Senior Technology Analyst
Bank of America Corp.
Email:[email protected]
[BrowserClient.java]
[DynamicClient.java] -
Generation of webservice client
in jdev 9.05 it is possible to generate a very simple webservice client which respect the original package names indicated in the wsdl by jdev:packageName is this not possible in version 10. I only seem to be able to generate a very complicated client which does not respect the original package names.
Thank you for the answer.
My main problem would then be "legacy" web-services created in jdeveloper 9.05. I wish to maintain and extend existing ones created with "oracle web-services and my new ones with jax-rpc.
But I have other systems and departments depending on my services and cannot change upgrade existing ones to jax.rpc them without high costs, so this is not an option for me.
Therefore I have to be able to create the same clients as in 9.05 or I will not be able to upgrade to 10g. -
How to get SYSDATE in the header section dynamically when we run the report
I have one more issue may i know how can i get the sysdate in the header section when i run the report.
as we have the requirement like this
In the header section
Run Date : ("sysdate").
How to get the sysdate dynamically in the RTF template, when i go across the google i found that header and footer section did not allow form fiields .
So is there any way to do it.
Thanks in Advance.
Have a Nice Day.You cannot insert form fields in the Header section, but you can just insert the code to achieve this. For example: insert this in the header section to view the sysdate: You could format the date as you would like..
<?xdoxslt: sysdate(‘YYYY-MM-DD’)?>
Since you are new to BI publisher, search the forum, review the Report Designer's guide for BI publisher. You will find that most of your basic questions are answered there and there are examples as well.
Thanks! -
I am Getting the classcast error while using the webservice client
Hi ,
Iam getting classcast exception while trying to get the connection Object throurh the webservice client.
The details are:
the ra.xml
<resourceadapter-version>1.6</resourceadapter-version>
<resourceadapter>
<resourceadapter-class>oracle.apps.contactCenter.mct.model.connector.CCAResAdapterImpl</resourceadapter-class>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>oracle.apps.contactCenter.mct.model.connector.CCAMangConnFactImpl</managedconnectionfactory-class>
<connectionfactory-interface>oracle.apps.contactCenter.mct.publicModel.connector.MCTConnectionFactIF</connectionfactory-interface>
<connectionfactory-impl-class>oracle.apps.contactCenter.mct.model.connector.CCAConnectionFactImpl</connectionfactory-impl-class>
<connection-interface>oracle.apps.contactCenter.mct.publicModel.connector.MCTConnectionIF</connection-interface>
<connection-impl-class>oracle.apps.contactCenter.mct.model.connector.CCAConnectionImpl</connection-impl-class>
</connection-definition>
<transaction-support>NoTransaction</transaction-support>
<reauthentication-support>false</reauthentication-support>
</outbound-resourceadapter>
</resourceadapter>
The weblogic-ra.xml
<enable-access-outside-app>true</enable-access-outside-app>
<outbound-resource-adapter>
<connection-definition-group>
<connection-factory-interface>oracle.apps.contactCenter.mct.publicModel.connector.MCTConnectionFactIF</connection-factory-interface>
<connection-instance>
<jndi-name>MctEIS11/connFctryCCA</jndi-name>
<connection-properties>
<pool-params>
<initial-capacity>5</initial-capacity>
<max-capacity>10</max-capacity>
<capacity-increment>1</capacity-increment>
</pool-params>
</connection-properties>
</connection-instance>
</connection-definition-group>
</outbound-resource-adapter>
</weblogic-connector>
The web.xml
<servlet>
<servlet-name>MyWebService1SoapHttpPort</servlet-name>
<servlet-class>myapp.Class1JCA</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MyWebService1SoapHttpPort</servlet-name>
<url-pattern>/MyWebService1SoapHttpPort</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
</web-app>
The client is
Context m_context;
MCTConnectionIF m_connection = null;
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
env.put(Context.PROVIDER_URL, "t3://localhost:7101");
try {
m_context = new InitialContext(env);
System.out.println("Got the context objNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN");
MCTConnectionFactIF m_cxFactory = null;
Object objFactory = null;
objFactory = m_context.lookup("MctEIS11/connFctryCCA");
System.out.println(objFactory.toString());
m_cxFactory = (MCTConnectionFactIF)objFactory;
System.out.println(m_cxFactory.toString());
m_connection = (MCTConnectionIF)m_cxFactory.getConnection(); //
When i run this i am getting the exception as
Entering!!!!!!!!!!!!!!!!!!!!!
Got the context objNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
[oracle.apps.contactCenter.mct.model.connector.CCAConnectionFactImpl@14bc17f|mailto:oracle.apps.contactCenter.mct.model.connector.CCAConnectionFactImpl@14bc17f]
java.lang.ClassCastException: oracle.apps.contactCenter.mct.model.connector.CCAConnectionFactImpl cannot be cast to oracle.apps.contactCenter.mct.publicModel.connector.MCTConnectionFactIF
at myapp.Class1JCA.GetConnection(Class1JCA.java:47)
I have checked that the jar files are matching in both client an connector side
Please help me on thisIs that ever running ? Where/how did you installed tuxedo ? Which OS user was used for tuxedo install ?
Nicolas. -
Adding a WebService Client to a Web Application
Hi, Everybody,
I built a Bepl Module in which I had a ECHO WebService and the response parameter is a complex type.
Then I built a Web application, and used the WSDL file to add a WebService Client to a this Web Application,
but I found that the WebService Referrence dose not contain any method, so I could not add it in my jsp page.
But when I changed the Response Message Part Type into a simple one, everything worked fine.
*All the progress is the same as " [Using a Manually Created WSDL as a Web Service Client|https://open-esb.dev.java.net/kb/v2/javaeesetut.html] ", but change the simple type into complex type.*
I want to know if the WebService Client Referrence dose not support generating java code which contains complex type or I had a wrong operation?
thanksThere are current limitations with the wsimport functionality and an issue has been logged.
If you have a look at the blog entry from Andrew Hopkinson.....
[http://blogs.sun.com/toxophily/entry/javacaps_tip_migrating_a_simple]
...you'll see part way down what the WSDL must look like to work with wsimport, i.e.....
Message parts must be created using an Element rather than a specific type and the element must be defined in a local in-line schema.
This in-line element can only contain a sequence with a single sub-element of a specific Complex Type.
The name of the input element must be the same as the operation it will be used in.
nillable element option should not be used because this will cause your strings to be returned as JAXBElements and not Strings.
...etc....
Bit painful I know, but this is the only workaround until the bug is fixed. -
Webservice client is not working for secured service
Hi Experts,
Currently i am facing issue when i try to access the secured webservice,
I used jdeveloper 11.1.2.1.0 to create the webservice client proxy and found the following error if i invoke the service,
I am using the following code to access the service,
URL url = new URL(".", wsdl_url);
MyService myservice = new MyService(url, new QName("urn:drs.test.com",
"MyService"));
myTester = myservice .getTester();
Map<String, Object> reqContext = ((BindingProvider) myTester ).getRequestContext();
reqContext.put(BindingProvider.USERNAME_PROPERTY, "user name");
reqContext.put(BindingProvider.PASSWORD_PROPERTY, "password");
May i know the reason for this issue?
javax.wsdl.WSDLException: WSDLException: faultCode=INVALID_WSDL: Invalid XML in source with PublicId: null: oracle.xml.parser.v2.XMLParseException: Whitespace required.
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:344)
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:294)
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:278)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.readWSDLInternal(CachedWSDLReader.java:531)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.readWSDL(CachedWSDLReader.java:484)
at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.readWSDL(CachedWSDLReader.java:455)
at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel.fetchWSDL(SpecifyWsdlPanel.java:1050)
at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel$1.run(SpecifyWsdlPanel.java:364)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
at java.lang.Thread.run(Thread.java:662)
Caused by: oracle.xml.parser.v2.XMLParseException: Whitespace required.
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
at oracle.xml.parser.v2.XMLReader.scanQuotedString(XMLReader.java:1831)
at oracle.xml.parser.v2.XMLReader.scanQuotedString(XMLReader.java:1939)
at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:489)
at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:363)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:321)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:337)Hi
I am facing similar issue but with Custom Adapter . I copied the axis jars under the JavaTasks folder but it does not help.
I then copied them under the oim.ear/APP_INF/lib and restarted the OIM managed server but somehow even that does not help.
I get following error.
Caused by: java.lang.NoSuchMethodError: org/apache/axiom/om/OMAbstractFactory.getMetaFactory()Lorg/apache/axiom/om/OMMetaFactory;
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:150)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:133)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:104)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:590)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:575)
at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:90)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:857)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:151)
Any pointer on how I can try to resolve it.
Regards
Abhinav -
Webservice client generated from WSDL null entity problem
hi,
I'am having a serious problem using the generation (data centric development) capability of Flash builder.
I have a simple XSD and generated WSLD (from Spring Framework using JAXB). In this I have defined an UpdateRelatie function.
It looks something like this:
<xsd:element name="UpdateRelatieRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="relatie" type="relatie" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="UpdateRelatieResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="relatie" type="relatie" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="relatie">
<xsd:sequence>
<xsd:element name="id" type="xsd:int" />
<xsd:element name="naam" type="xsd:string" />
<xsd:element name="telefoonNummer" type="xsd:string" />
<xsd:element name="mobielNummer" type="xsd:string" />
<xsd:element name="email" type="xsd:string" />
<xsd:element name="rekeningNummer" type="xsd:string" />
<xsd:element name="btwNummer" type="xsd:string" />
<xsd:element name="kvkNummer" type="xsd:string" />
<xsd:element name="actief" type="xsd:boolean" />
</xsd:sequence>
</xsd:complexType>
My generated WSDL looks something like this (for the update part as show above).
<?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:schema="http://www.mydomain.nl/gbs/service/ws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://www.mydomain.nl/gbs/service/ws">
<wsdl:types>
<xsd:schema xmlns="http://www.mydomain.nl/gbs/service/ws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.mydomain.nl/gbs/service/ws">
[excluded xsd.. see above]
</xsd:schema>
</wsdl:types>
<wsdl:message name="UpdateRelatieRequest">
<wsdl:part element="schema:UpdateRelatieRequest" name="UpdateRelatieRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="UpdateRelatieResponse">
<wsdl:part element="schema:UpdateRelatieResponse" name="UpdateRelatieResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="Relatie">
<wsdl:operation name="UpdateRelatie">
<wsdl:input message="schema:UpdateRelatieRequest" name="UpdateRelatieRequest">
</wsdl:input>
<wsdl:output message="schema:UpdateRelatieResponse" name="UpdateRelatieResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RelatieBinding" type="schema:Relatie">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="UpdateRelatie">
<soap:operation soapAction=""/>
<wsdl:input name="UpdateRelatieRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="UpdateRelatieResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="RelatieService">
<wsdl:port binding="schema:RelatieBinding" name="RelatiePort">
<soap:address location="http://localhost:8080/GBS/relatieService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
When I run my test client written in Java, I can update any given relatie-object in my database.
BUT when I, based upon this, generate a webservice stub using the "data -> connect to webservice" option. I get nicely generated code and the ability to to bind this to an form with which I can edit the data.
Now for my PROBLEM:
When I enter data in the form, during the process of transforming my Relatie object to XML, my entire object disappears. i.e. my object does NOT get transformed to XML for soap transport. Somewhere deep in the webservice code, it just gets ignored and I do NOT know why.
What does work is retrieving data through a webservice. I can display a nice grid full of data from my database. What does not work is trying to send a domain object (Relatie) from Flex through a webservice and process it in java. The object is null on the java side. I can even see in the resulting soap envelope that nothing gets transformed to XML. See output below:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<schema:UpdateRelatieRequest xmlns:schema="http://www.mydomain.nl/gbs/service/ws"/> <!-- NO OBJECT -->
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Which should have been based upon the given WSDL (as the java client does send over the wire)
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns3:InsertRelatieRequest xmlns:ns3="http://www.mydomain.nl/gbs/service/ws">
<relatie>
<btwNummer>BTW</btwNummer> <!-- OBJECT PRESENT -->
<actief>false</actief>
</relatie>
</ns3:InsertRelatieRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Can anyone help me please. I'am stuck now.
Kind regards,
MarcThanks for the detailed steps. I was able to reproduce the issue.
I have logged an issue under 'WebService'. https://bugs.adobe.com/jira/browse/SDK-24841 . We will look into it.
-Radhakrishna -
How To Develop a Simple WebService App XI Scenarios
Hi,
How can I develop A simple Webservice for any scenario, for example, if am doing File to file scenario, and i want to develop a Webservice for the same scenario,
I think in ID we have an option Under Tools "Define Webservice" where in we can use wsdl format of the message interfaces.
How should i proceed to develop the Webservice?
Regards,
VarunHi Varun,
After creating the wsdl file u can deploy using MS visual studio.
Follow the steps and run the scenario.
use it in a Client Program in .NET : (assuming Maths as the WSDL and Webserice name)
1.) Place maths.wsdl in C:/Sample/ folder
2.) Open Visual studio command prompt using the Start Menu
Start->Programs->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt
3.) In the Command prompt go to that directory
> C:
> CD\
> CD Sample
> wsdl maths.wsdl /out:"c:\sample"
4.) The previous step will create a file called Maths.cs , go to that folder and confirm this
5.) Open Microsoft Visual Studio 2005, open the Client application where this webservice needs to be called
6.) If your Client application is a web application, the see if the website has a folder called "App_Code"
If not then create this folder. Right Click on this folder and click on "Add Existing Item"
7.) Browse to C:/sample and select the Maths.cs file
8.) If your client is a Desktop application , just add this file in a similar manner to the project(no need of creating any folder)
9.) After the file gets added, open Maths.cs file
10.) Add a namespace to it for convinience
eg:
namespace SAP
This should come before the Class Declaration and close it after the class
eg: See the red lines
namespace SAP
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "Equi_get_NotifBinding", Namespace = "http://Equipment_Get_Notifications")]
public partial class Equi_get_NotifService : System.Web.Services.Protocols.SoapHttpClientProtocol
functions....
11.) Save the Maths.cs file
12.) Open the Webform or windows form code where this webserive will be called
13.) The webservice will now be available here under the SAP namespace
so when u type "SAP." u will get all the classes in it.
Add credential in this code as shown below
eg:
private void GetNotifications()
try
SAP.Equi_get_NotifService ser1 = new SAP.Equi_get_NotifService(); //This is the Webserive Proxy class
SAP.Equi_get_Notif_Request req = new SAP.Equi_get_Notif_Request(); //Request Class
req.Equipment = SAPID;
req.Date = Calendar1.SelectedDate;
System.Net.CredentialCache ch = new System.Net.CredentialCache(); //Adding Credentials for authentication on webservice server
System.Net.NetworkCredential cr = new System.Net.NetworkCredential("xisuper", "infotech");
ch.Add(new Uri(ser1.Url), "Basic", cr);
ser1.Credentials = ch; // Assing this Credential to the ProxyClass.Credentials property as shown here
SAP.Equi_get_Notif_ResponseNotifications[] res = ser1.Equi_get_Notif(req); //Call the webservice, res is the responce object
GridView1.DataSource = res;
GridView1.DataBind();
catch (Exception ex)
Response.Write(ex.Message);
"Award points if it is helpful" -
Problem running ClientGen generated webservice client
I'm using Workshop for Weblogic 10.3 and I'm trying to generate a webservice client. When I generate it with ClientGen and I try to use it I get the following error:
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/j2ee/descriptor/ServiceRefHandlerBean
at weblogic.wsee.jaxrpc.HandlerRegistryImpl.<init>(HandlerRegistryImpl.java:32)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:88)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at testClient.main(testClient.java:18)
If I add the com.bea.core.descriptor.j2ee_1.1.0.0.jar to the libraries then I get the following error:
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: com/sun/xml/ws/util/JAXWSUtils
at weblogic.wsee.util.is.InputSourceUtil.loadURL(InputSourceUtil.java:44)
at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:118)
at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65)
at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)
at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:403)
at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:389)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:79)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:66)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:476)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:119)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at com_service_osadia_interface.wovenware.SERVICE_OSADIA_Impl.<init>(Unknown Source)
at testClient.main(testClient.java:18)
How can I fix it?I didn't see a mistake, but my sample works fine. Are you trying to execute the client from Workshop / Eclipse? If that is the case, then I believe it's a matter of just using the appropriate client libraries, which I believe is your issue even though the error is misleading. You should definitely try using a Java Project for a stand-alone web service invocation. According to this link: http://edocs.bea.com/wls/docs103/webserv_rpc/client.html#wp229351 you simply need 1 jar file named wseeclient.jar on your path, which is archived inside <WL_INSTALL>\wlserver_10.3\server\lib\wseeclient.zip
Once I set up a new Java Project with wseeclient.jar on my path and my clientgen generated classes, I could invoke the sample.
Also, here is what the successful invocation from the command line using (ant build, ant deploy, ant run):
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant build
Buildfile: build.xml
clean:
[delete] Deleting directory C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar
[delete] Deleting directory C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
server:
[mkdir] Created dir: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar
[jwsc] JWS: processing module /SimpleImpl
[jwsc] Parsing source files
[jwsc] Parsing source files
[jwsc] 1 JWS files being processed for module /SimpleImpl
[jwsc] JWS: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple\SimpleImpl.java Validated.
[jwsc] Since compiler setting isn't classic or modern,ignoring fork setting.
[jwsc] Compiling 2 source files to C:\temp\_x58sqp
[jwsc] Since compiler setting isn't classic or modern,ignoring fork setting.
[jwsc] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF
[jwsc] Copying 22 files to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF
[jwsc] Copying 2 files to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl\WEB-INF\classes
[jwsc] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\SimpleImpl
[jwsc] [EarFile] Application File : C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar\META-INF\application.xml
[AntUtil.deleteDir] Deleting directory C:\temp\_x58sqp
client:
[mkdir] Created dir: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[clientgen] Ignoring JAX-WS options - building a JAX-RPC client
[clientgen]
[clientgen] *********** jax-rpc clientgen attribute settings ***************
[clientgen]
[clientgen] wsdlURI: file:/C:/Oracle/wls10.3/wlserver_10.3/samples/server/examples/build/webservicesJwsSimpleEar/SimpleImpl/WEB-INF/SimpleImplService.wsdl
[clientgen] serviceName : null
[clientgen] packageName : examples.webservices.jws_basic.simple.client
[clientgen] destDir : C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[clientgen] handlerChainFile : null
[clientgen] generatePolicyMethods : false
[clientgen] autoDetectWrapped : true
[clientgen] jaxRPCWrappedArrayStyle : true
[clientgen] generateAsyncMethods : true
[clientgen]
[clientgen] *********** jax-rpc clientgen attribute settings end ***************
[clientgen] Package name is examples.webservices.jws_basic.simple.client
[clientgen] DestDir is C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[clientgen] class name is Simple_Stub
[clientgen] service class name is SimpleImplService
[clientgen] Porttype name is Simple
[clientgen] service impl name is SimpleImplService_Impl
[javac] Compiling 4 source files
[javac] Note: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client\examples\webservices\jws_basic\simple\client\Simple_Stub.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Compiling 1 source file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\clientclasses\webservicesJwsSimple_client
[jar] Updating jar: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\examplesWebApp\WEB-INF\lib\jws_basic_simple.jar
[copy] Copying 1 file to C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\examplesWebApp
build:
BUILD SUCCESSFUL
Total time: 22 seconds
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant deploy
Buildfile: build.xml
deploy:
[wldeploy] weblogic.Deployer -verbose -noexit -source C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar -targets examplesServer -adminurl t3://localhost:7001 -user weblogic -password ******** -deploy
[wldeploy] weblogic.Deployer invoked with options: -verbose -noexit -source C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJwsSimpleEar -targets examplesServer -adminurl t3://localhost:7001 -user weblogic -deploy
[wldeploy] <Dec 23, 2008 2:48:19 PM CST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, webservicesJwsSimpleEar [archive: C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\build\webservicesJws
SimpleEar], to examplesServer .>
[wldeploy] Task 0 initiated: [Deployer:149026]deploy application webservicesJwsSimpleEar on examplesServer.
[wldeploy] Task 0 completed: [Deployer:149026]deploy application webservicesJwsSimpleEar on examplesServer.
[wldeploy] Target state: deploy completed on Server examplesServer
[wldeploy]
[wldeploy] Target Assignments:
[wldeploy] + webservicesJwsSimpleEar examplesServer
BUILD SUCCESSFUL
Total time: 9 seconds
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple>ant run
Buildfile: build.xml
run:
[java] Got result: Here is the message: 'Hi there!'
BUILD SUCCESSFUL
Total time: 7 seconds
C:\Oracle\wls10.3\wlserver_10.3\samples\server\examples\src\examples\webservices\jws_basic\simple> -
Creating a simple java client for a session EJB local interface
Hi all
Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
The problem is that it creates a test client for a remote interface only...
i.e.
MySessionEJB sessionEJB = context.lookup("MySessionEJB")
and once i try to adjust it manually for the local interface...
MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
it generates the exception:
javax.naming.NotFoundException: SessionEJBLocal not found
at...........................(RMIClientContext.java:52)
There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
Thanks in advance.
Alex.Pedja thanks for reply.
I still dont understand what is wrong with my example.
The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
Thanks. Alex. -
Problem invoking from a BPEL process webservice client
I have a BPEL Synchronous process that invokes a webservice deployed on Tomcat. The process executes without any exception when I run it from the BPEL Console. Since I want to execute the BPEL process as a command line operation, I created a BPEL Process Webservice client from scratch using Axis as described in Tutorial7 - InvokingBPELProcesses.pdf. However when I try to execute the client, I get the following error:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.generalException
faultSubcode:
faultString: Dispatcher send error.
An error occurred while sending a batch message to the dispatch queue. The exception is: Failed to create "java:comp/env/ejb/local/DispatcherLocalBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/local/DispatcherLocalBean not found in startup_war
at com.oracle.naming.J2EEContext.getSubContext(J2EEContext.java:93)
at com.oracle.naming.J2EEContext.lookup(J2EEContext.java:76)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:177)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:119)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.collaxa.cube.engine.util.CubeEngineBeanRegistry.lookupDispatcherLocalBean(CubeEngineBeanRegistry.java:165)
at com.collaxa.cube.engine.util.CubeEngineBeanCache.getDispatcherLocalBean(CubeEngineBeanCache.java:91)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendLocal(DispatchHelper.java:229)
at com.collaxa.cube.engine.dispatch.Dispatcher.receive(Dispatcher.java:430)
at com.collaxa.cube.engine.dispatch.Dispatcher.receive(Dispatcher.java:357)
at com.collaxa.cube.engine.dispatch.Dispatcher.update(Dispatcher.java:253)
at com.collaxa.cube.engine.core.event.DomainObserverRegistry.notify(DomainObserverRegistry.java:124)
at com.collaxa.cube.engine.core.event.DomainObserverRegistry.notify(DomainObserverRegistry.java:66)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.notify(CubeProcessHolder.java:727)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.addProcess(CubeProcessHolder.java:697)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcessHolder.java:632)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadAndBind(CubeProcessHolder.java:605)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadAndBind(CubeProcessHolder.java:592)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.getProcess(CubeProcessHolder.java:494)
at com.collaxa.cube.engine.deployment.CubeProcessHolder.getProcess(CubeProcessHolder.java:429)
at com.collaxa.cube.engine.CubeEngine.lookupProcess(CubeEngine.java:840)
at com.collaxa.cube.ws.wsdl.WSDLManager.getProcess(WSDLManager.java:437)
at com.collaxa.cube.ws.wsdl.WSDLManager.getPartnerWSDL(WSDLManager.java:300)
at com.collaxa.cube.ws.soap.providers.CXSOAPProvider.processBPELMessage(CXSOAPProvider.java:175)
at com.collaxa.cube.ws.soap.providers.CXSOAPProvider.invoke(CXSOAPProvider.java:111)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)
at com.collaxa.cube.fe.CollaxaServlet.service(CollaxaServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
".
Can someone please tell me what is it I am doing wrong?I was using
Oracle BPEL Server version 2.0
Build: 2004.06.17.14.40
Build time: Thu Jun 17 14:40:58 PDT 2004
However, I downloaded the latest version of the Process Manager and did not face the same problem.
Maybe you are looking for
-
I'm having a problem converting my music videos to mpeg4...they are in MOV format so I am able to put them into itunes, and everytime I try to "convert selection to ipod" it converts it very fast but when I try playing the video it just shows a white
-
Customer Address in Sales Order
Any changes to the Customer Master to update any open orders and any orders with delivery created, no changes to update in Sales Orders that are PGID/ Invoiced. Any direct solution or work around please. Edited by: Srikar Kaja on May 7, 2010 10:30 PM
-
Work flow (User Status)
Dear All Can any one guide me, can i trigger workflow through user status of project definition or work break down structure Best regards
-
[Solved]Laptop does not start (not even bios)
Hi all, I was about to install archlinux on my laptop. When I generate partitions (I used GPT), I saw something like this: "If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned
-
Need to move employees to another organizational unit
Hi, Can any one explain and write down steps required while moving employees from one organisational unit to other organisational unit. Points will be given Thanks in advance