Java WSDL based FIM WebService Client ?
Hello ,
I have seen recommendations to write a .NET client to use the FIM Web Services, does anyone have experience in trying to have a Java system use the FIM Web Services?
If yes, how did you implement this?
How do you publish traditional WSDL..
Thank you.
Hello HiteshBhardwaj,
I think that many people write client in .NET because you have some resources on the internet, like the
FIM 2010 Resource Management Client and its fork from
Predica
Regards,
Sylvain
Similar Messages
-
Weblogic 8.1 Webservice Client Proxy Authentication not working
We have a desktop console based Weblogic webservices client application that uses client stubs to establish the connection and communicate with the server where the WSDL was hosted.
We are facing a problem in authenticating the Proxy user with valid credentials.
We are using the following code to set the system properties and Authenticator class to authenticate the proxy user.
//Code Segment #1
Code:
System.setProperty("http.proxyHost", proxyHost);System.setProperty("https.proxyHost", proxyHost);
System.setProperty("weblogic.webservice.transport.http.proxy.host",proxyHost);
System.setProperty("weblogic.webservice.transport.https.proxy.host",proxyHost);
System.setProperty("http.proxyPort", proxyPort);
System.setProperty("https.proxyPort", proxyPort);
System.setProperty("weblogic.webservice.transport.http.proxy.port",proxyPort);
System.setProperty("weblogic.webservice.transport.https.proxy.port",proxyPort);
//System.setProperty("http.proxyType", "basic");
//System.setProperty("https.proxyType", "basic");
//System.setProperty("http.proxy.auth.type" ,"ntlm"); //This is not showing any impact
System.setProperty("http.proxyUser", "bsil\\ashok.kumar");
System.setProperty("https.proxyUser", "bsil\\ashok.kumar");
System.setProperty("http.proxyPassword", " xyzddd");
System.setProperty("https.proxyPassword", "xyzddd");
Authenticator.setDefault(new MyAuthenticator());
//Inner class
public static class MyAuthenticator extends Authenticator {
protected PasswordAuthentication getPasswordAuthentication() {
String username = System.getProperty("http.proxyUser");
String password = System.getProperty("http.proxyPassword");
return new PasswordAuthentication(username, password.toCharArray());
We are using following code initialize the stubs (Which internally opens a connection to the given endpoint base URL)
//Code Segment #2
Code:
SessionService_Impl sessionService = new SessionService_Impl(getEndPointURL(SessionServicePort.class));
port = sessionService.getSessionServicePort();
return port;
Using above code it always throws the following exception:
Code:
weblogic.webservice.tools.wsdlp.WSDLParseException: Failed to retrieve WSDL from https://apiclienttest.intralinks.com:443/webservices51/SessionService?WSDL. Please check the URL and make sure that it is a valid XML file [java.io.IOException: Proxy authenticator failed: java.lang.ClassNotFoundException: ]
if i replace the above code (Code Segment #2) to as bellow with Code Segment #3 then its working as expected. But we have been told that the Code Segment #2 is required as shwon above for the Weblogic ClientTimeout seconds feature so we cant replace the Code Segment #2 with Code Segment #3 since we don?t want to miss the ClientTimeout seconds feature for the application.
//Code Segment #3
Code:
SessionService_Impl sessionService = new SessionService_Impl();
SessionServicePort sessionServicePort = sessionService.getSessionServicePort();
((SessionServicePort_Stub) sessionServicePort)._setProperty("javax.xml.rpc.service.endpoint.address", endPointBaseURL+"SessionService");
return sessionServicePort ;
why the Proxy authentication is failing with the Code Segment #2 and why it is passing in case of Code Segment #3
The endpoint base URL we are hitting is hosted on Weblogic server 9.0 (which is hosted at client side in US so it is behind our firewall).
Is some thing more do we need to do in Authenticator class???
Please help me if any one has worked on proxy server authenticator in java.We have a desktop console based Weblogic webservices client application that uses client stubs to establish the connection and communicate with the server where the WSDL was hosted.
We are facing a problem in authenticating the Proxy user with valid credentials.
We are using the following code to set the system properties and Authenticator class to authenticate the proxy user.
//Code Segment #1
Code:
System.setProperty("http.proxyHost", proxyHost);System.setProperty("https.proxyHost", proxyHost);
System.setProperty("weblogic.webservice.transport.http.proxy.host",proxyHost);
System.setProperty("weblogic.webservice.transport.https.proxy.host",proxyHost);
System.setProperty("http.proxyPort", proxyPort);
System.setProperty("https.proxyPort", proxyPort);
System.setProperty("weblogic.webservice.transport.http.proxy.port",proxyPort);
System.setProperty("weblogic.webservice.transport.https.proxy.port",proxyPort);
//System.setProperty("http.proxyType", "basic");
//System.setProperty("https.proxyType", "basic");
//System.setProperty("http.proxy.auth.type" ,"ntlm"); //This is not showing any impact
System.setProperty("http.proxyUser", "bsil\\ashok.kumar");
System.setProperty("https.proxyUser", "bsil\\ashok.kumar");
System.setProperty("http.proxyPassword", " xyzddd");
System.setProperty("https.proxyPassword", "xyzddd");
Authenticator.setDefault(new MyAuthenticator());
//Inner class
public static class MyAuthenticator extends Authenticator {
protected PasswordAuthentication getPasswordAuthentication() {
String username = System.getProperty("http.proxyUser");
String password = System.getProperty("http.proxyPassword");
return new PasswordAuthentication(username, password.toCharArray());
We are using following code initialize the stubs (Which internally opens a connection to the given endpoint base URL)
//Code Segment #2
Code:
SessionService_Impl sessionService = new SessionService_Impl(getEndPointURL(SessionServicePort.class));
port = sessionService.getSessionServicePort();
return port;
Using above code it always throws the following exception:
Code:
weblogic.webservice.tools.wsdlp.WSDLParseException: Failed to retrieve WSDL from https://apiclienttest.intralinks.com:443/webservices51/SessionService?WSDL. Please check the URL and make sure that it is a valid XML file [java.io.IOException: Proxy authenticator failed: java.lang.ClassNotFoundException: ]
if i replace the above code (Code Segment #2) to as bellow with Code Segment #3 then its working as expected. But we have been told that the Code Segment #2 is required as shwon above for the Weblogic ClientTimeout seconds feature so we cant replace the Code Segment #2 with Code Segment #3 since we don?t want to miss the ClientTimeout seconds feature for the application.
//Code Segment #3
Code:
SessionService_Impl sessionService = new SessionService_Impl();
SessionServicePort sessionServicePort = sessionService.getSessionServicePort();
((SessionServicePort_Stub) sessionServicePort)._setProperty("javax.xml.rpc.service.endpoint.address", endPointBaseURL+"SessionService");
return sessionServicePort ;
why the Proxy authentication is failing with the Code Segment #2 and why it is passing in case of Code Segment #3
The endpoint base URL we are hitting is hosted on Weblogic server 9.0 (which is hosted at client side in US so it is behind our firewall).
Is some thing more do we need to do in Authenticator class???
Please help me if any one has worked on proxy server authenticator in java. -
Error creating Webservice Client in JAVA for ABAP Webservice(WSDL file)
Hi all,
I have created a webservice from a funtion module in the backend.
Using soamanger I downloaded the wsdl file using "Open WSDL document for selected binding" link.
I tested this web service in backend and it is working fine.
Now I am trying to generate JAVA cilent for this webservice using Eclipse and Axis,but getting the following error
IWAB0399E Error in generating Java from WSDL: WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy):
faultCode=INVALID_WSDL: Encountered unexpected element '{http://schemas.xmlsoap.org/ws/2004/09/policy}Policy'.:
WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element
'{http://schemas.xmlsoap.org/ws/2004/09/policy}Policy'.:
at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Unknown Source)
Please let me know,wat needs to be done for this error to get resolved
Thanks
SanthoshHi,
I am also getting the same error while generating the client class from IBM Rational Application Developer IDE.
Here is the error I get.
WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
[java] at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
[java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
[java] at java.lang.Thread.run(Thread.java:571)
Did you find out the cause of this issue?
Thanks & Regards,
Vijay -
Non Java Webservice client Authentication
I see in the Weblogic docs many examples of Java webservice clients. Including
one that passes a user id and password through the getXXXPort(userid, password)
call for authenticating the user at runtime. My question is, can a non Java webservice
client authenticate itself in somewhat the same manor? A non Java client wouldn't
have the client jar file available containing the stubs and all.
If someone has a code snippet they could send me it would be most appreciated.
Thanks,
Craig LindleyHi Craig,
An partial example using .NET is attached; in this environment you need
to use their NetworkCredential class.
Hope this helps,
Bruce
craig lindley wrote:
>
I see in the Weblogic docs many examples of Java webservice clients. Including
one that passes a user id and password through the getXXXPort(userid, password)
call for authenticating the user at runtime. My question is, can a non Java webservice
client authenticate itself in somewhat the same manor? A non Java client wouldn't
have the client jar file available containing the stubs and all.
If someone has a code snippet they could send me it would be most appreciated.
Thanks,
Craig Lindleyusing System;
using System.Net;
namespace SecurityBasicClient
class AuthClient
[STAThread]
static void Main(string[] args)
SoapInteropBaseService ws = new SoapInteropBaseService();
ws.Url = "http://webservice.bea.com:7001/base/SoapInteropBaseService";
Console.Write("User:");
string strUser = Console.ReadLine();
Console.Write("Password:");
string strPassword = Console.ReadLine();
ICredentials credentials = new NetworkCredential(strUser,strPassword);
try
ws.Credentials = credentials;
Console.WriteLine(ws.echoString("Hello World"));
catch (Exception err)
Console.WriteLine(err.Message);
finally
Console.ReadLine(); -
Webservice Client implementation - java.lang.ClassCastException
Hi,
We are trying to implement a WebService Client for the secure Webservice. I have created a deployable proxy client and deployed it on the server, our basis has attached the X509 certificate to the proxy in VA. Test Destination is successful. I have exposed the client as public part in the ws client dc project.I have created a used dc relationship to the webservice client project in my EP Component project. I'm trying to use this client in a AbstractPortal component with following code
SECQANDA seq = (SECQANDA) ctx.lookup("<JNDI location");
I get a ClassCastException on this line
java.lang.ClassCastException: <package>.SECQANDAImpl incompatible with <package>.SECQANDA
Have anyone faced this problem? How do I resolve this error?
Appreciate any help.
Thanks,
Giri.Hi Martin,
Appreciate your response. I'm not able to cast to SECQANDAImpl because this implementaion class is not in my DC. What I understand is it gets implemented on deployment of the deployable proxy. Does that ring any bell?
Thanks,
Giri. -
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] -
Webservices Client, Exceptions and Log4J
Hi all.
Let me explain the setup of our project before asking for a solution on my problem!
We are implementing a project with 2 teams. One team handles everything that has to deal with the front-end and uses a wsdl to generate a webservices client side that is trigger for most of the requests.
Another team creates the complete backend including the webservices server side.
Thus, we (as team one) do not interfere nor guide team two in how they implement things.
Now here's the problem.
Our side uses Log4J to log all the exceptions. There side probably doesn't (we don't know). If however an exception is triggered from within a WebService call, it is not send to Log4J but to the standard System.out !
Is there any way to change this? Because the only thing we do is generate a client from the WSDL and nothing else! We do however catch any exception and store a message in our log files, but before the catch happens, our System.out has already added the WSexcpetion :(
Is this clear in any way?
Anyone?
Thanks in advance,
Kind Regards,
Les.A web service client written on WLS [1], should work with
service hosted by any vendor, including .Net, AXIS, Sun RI,
etc.
The client code you write in WLS which is based on JAX-RPC [1]
should compile as is on other vendor JAX-RPC implementation.
So, if you are looking for client code portability then JAX-RPC
is your best bet.
Regards,
-manoj
[1] http://edocs.bea.com/wls/docs81/webserv/client.html#1069703
[2] http://java.sun.com/xml/jaxrpc/
"hanks" <[email protected]> wrote in message
news:3ea3392d$[email protected]..
>
I have tried webservices with apache and weblogic7.0 but i realised thatboth was
to be done very specific to servers.I may be wrong. I am trying tounderstand
how can i write a sercive for one server and access using another server.
When i write webservice in java tomcat server, I create a service andregister
as urn name. For a client to access this service, code kind of looks ejbcode
where we lookup the service and call its method. Instead of looking upJNDI name
we lookup urn and access method. Mind you this client uses ORG packagesspecific
to tomcat.
Now when we write a websercice with weblogic we have to create a ear whichhas
webserverice and write a client to access that service, which lookscompletely
diffrent from one that we wrote for tomcat. I am wondering how can i usethe same
client to access both the services. It rarely happens that both side wouldbe
using same servers.
I am sure that there is some mistake i m doing cos webservices is supposeto be
even language independent.
Can you guys help me in resolving this, more questions later ;-) -
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 - 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 -
Hi
I'm struggling with the FIM Web service connector in different areas that i need some help with.
For starters i just want to let you know that i've worked a great deal with the connector, and learned how to cope with most of the shortcomings and quirks. My work has mostly been for on-premise tasks, i.e. connecting to other on-premise systems.
Now I am trying to connect to a Web service over the Internet, hence the security setup is significantly different from what I am used to in conjunction with the Web Service Connector.
I this case the web services is https based and also requires a client certificate for authentication.
The client certificate part is actually not a problem as the connector supports authenticating using client certificates natively and it works like a charm.
My problems seems to be around using a https based web service, also that the web service presents itself as supporting both soap and soap12 requests. When I add the web service to the Web Service Configuration Tool, I receive a warning telling that one
of my endpoints has a unsupported (custom) binding, that is not a basic http binding. I actually discover two endpoints that seem alike but the failing one is based on soap12. I am not able to remove the failing endpoint within the Web Service Configuration
Tool and successive attempts to configure a Management Agent in FIM Sync Manager using this Web Service Project fails as unsupported bindings are used.
According to the hotfix update 1.0.419.911 for the FIM WebService Connector - this update should address certain limitations towards custom bindings, so I tried to implement this update.
But this gave another headache - after updating the Web Service Connector (actually uninstalling the old one, and installing the new one - as there seems to be some versioning mishaps) I am not able to start the Web Service Configuration Console as i am
presented with the following error:
Error occurred while running the tool
Could not load flie or assemply 'Microsoft.MetaDirectorySericesEx,Version=4.1.2.0...etc...
The error is: Strong name validation failed.
I've tried several things to address the issue, i.e.:
- Copying the Microsoft.MetaDirectorySericesEx.dll file from other folder to the UIShell\Web Service Configuration folder as the versions was not alike - resultet in manifest problems.
- Turning off Strong Name Checking for the library in question - the Web Config tools has able to start but crashed when used.
- Upgraded to newest build of FIM Sync (4.1.3559) - still not working.
So - my actual questions are:
- Does the FIM Web Service Connector support accessing web services that are https based in either the old (5.3.407.0) version or the new one (hotfix update 1.0.419.911) ?
- What about soap12?
- Did anyone succeed in implementing the new Web Service Connector update?
- Any hints on solving the problem I encountered with the Web Service Connector ?
Any input highly appreciated.
Best regards
SørenGot the Config Tool running today - yay!
The problem was a missing entry in the config file of the Config tool (WSConfigTool.exe.Config).
The Config tool assumed that the version of the Microsoft.MetadirectoryServicesEx.dll library registered was an older version as the current registered. The current version is depending on the build level of FIM.
To fix the problem open the .config file of the FIM Sync Service (C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\miiserver.exe.config) and copy the section shown below, please note that the newVersion parameter varies
depending on your FIM build level.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.MetadirectoryServicesEx" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="3.3.0.0-4.1.3.0" newVersion="4.1.4.0" />
</dependentAssembly>
<probing privatePath="Assemblies" />
</assemblyBinding>
</runtime>
Open the .config file of the WS Config Tool (C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\UIShell\Web Service Configuration\WSConfigTool.exe.Config) and paste the section into the file just before the closing of the
Configuration section </configuration>.
This will redirect the WS Config Tool to use the version of the library that is currently registered in the assembly cache.
Towards the problem with multiple bindings in a single web service - this seems to to a problem still :-(.
Rgds
Søren -
Netbeans 5.5 WebService Client - How do I pass a parameter to the service?
I'm using Netbeans 5.5 and have generated a webservice client (JAX-WS 2.0) off of the existing WSDL. The webservice requires me to pass it some information. Per the generated code, it is expecting an EncryptedData object. The problem is, I have no idea what the content of this data object should be as it pertains to an anonymous complex type. The code generated for this class is listed below. Any ideas? By the way, I know what SOAP should be generated... I just don't know how to stick the soap information into this EncryptedData object. Thanks!
* <p>Java class for anonymous complex type.
* <p>The following schema fragment specifies the expected content contained within this class.
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <any/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"content"
public static class EncryptedData {
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
* Gets the value of the content property.
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the content property.
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getContent().add(newItem);
* </pre>
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link String }
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
return this.content;
Message was edited by:
Tosa_Developerhello,
I have done exactly as you have mentioned but I am facing prob passing String or XML data in the newItem variable:
If I run the below code in jsp --->
EncryptedData eD=new EncryptedData ();
String newItem="test";
eD.getContent().add(newItem);
port.webMethod(eD);
I encouter the following error at runtime:
javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.SAXException2: unable to marshal type "java.lang.String" as an element because it is missing an @XmlRootElement annotation]
Pls help me pass either XML or String value to the webservice inside this encrpteddata.
Thanx 4 ton 4 ur time and help. -
How to register non-wsdl based URL in OEG
How do we register a non-wsdl based URL endpoint in OEG? We had no problem registering a simple WSDL based endpoint on an OEG server. However we cannot find documentation on how to secure/register a RESTful or JSON – URL based service (SOAP, XML over HTTP type service).
Does this functionality exist? Or are there best practices on what to do with OEG for these types of services?
Our use case looks like:
Akamai - - > OEG - -> OSB (WSDL, RESTful, JSON type web services) - -> .Net service (WSDL, RESTful, JSON type web services)In case of REST and other non-WSDL type services, there is no SOAP/WSDL based web service like registration process, you'd use OEG as the proxy. You can receive REST based requests at OEG, retrieve parameters (there are convenience filters available for retrieval of attribute values and other types of REST related functions in OEG, as part of the Policy library, "Extract REST Request Attribute", "Validate REST filter", "Create REST Request" etc. - search for REST at the top using Policy Studio, drag it on to canvas and click help for docs on these filters) and do the routing to actual REST end point services. You have the option to receive and use the SOAP message as a basis of generation of the REST url.
REST to SOAP - http://www.soatothecloud.com/2008/11/how-to-convert-from-rest-to-soap.html
SOAP to REST - http://markoneill.sys-con.com/node/1989916
On use with JSON: you can convert XML to JSON on the outbound side to serve mobile clients etc. using script based(standard XSLT) conversions at the gateway. Conversions to Java using google gson library is also an option.
To register a REST service, simply map the path (e.g. "/MyRESTService") to the policy you're using to process the REST request.
Let's say you want to simply route a REST request through OEG (e.g. - to OSB). You would create a policy (right-click on "Policies" and add it). Drag in a "Static Router" filter and place in it the hostname and port of the host you want to route to (e.g. - to OSB). Then right-click on it and choose "Set as start" so that it is the first thing which is processed for this REST request. Then drag in a "Connection" filter, and chain it (using a green arrow) after the Static Router filter. The "Connection" filter actually makes the connection to the backend host.
Now, map the path (using "Add Relative Path") to the service so that if a REST request to "/MyRESTService" or "/MyRESTService/something" comes into OEG, it is routed on to the backend host.
Deploy your policy (using F6 or the "deploy" button on the Policy Studio toolbar). Then send in your REST request.
There is actually already a simple REST service setup on OEG, called "healthcheck". If you point a browser to http://<OEG_IP_ADDRESS:8080/healthcheck" then this is run.
If the backend REST service returns JSON, the response JSON will simply be sent back through OEG. -
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> -
How to show argument variable names to webservice client
Hi java expert(S)!
This is sri, i am creating a webservice using sun java studio enterprise 8.1 IDE, my problem is consumer(from .net) say ,parameter names are not clear or visible. say, for example, my webservice method look like
public java.lang.String login(final String clientid, final String password) throws java.rmi.RemoteException {...}
to me but for webservice client String login(String_1, String_2). so how to show argument variables to client
webservice client needs to know argument names for proper usage.
Any body knows how to do this, Any help will be appreciated!!!!!
Thanks & Regards,
SRI.hI
i have posted my wsdl below
If you go through , you can find that in order to call a method , we have to supply string or int arguments but those names are not shown
for example to call login , you need to supply 2 string arguments but how do you know first one is username and second one is for password.
it shows simply string_1 and string_2 as arguments, instead if it shows login(String username,String password) for caller(webservice client), it will be easy to handle you know.
How to do this????
<definitions name="mysws" targetNamespace="urn:mysws/wsdl">
−
<types>
−
<schema targetNamespace="urn:mysws/types">
−
<complexType name="getData">
−
<sequence>
<element name="String_1" type="string" nillable="true"/>
<element name="String_2" type="string" nillable="true"/>
<element name="int_3" type="int"/>
</sequence>
</complexType>
−
<complexType name="getDataResponse">
−
<sequence>
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
−
<complexType name="getMoreRows">
−
<sequence>
<element name="int_1" type="int"/>
<element name="int_2" type="int"/>
<element name="int_3" type="int"/>
</sequence>
</complexType>
−
<complexType name="getMoreRowsResponse">
−
<sequence>
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
−
<complexType name="insertData">
−
<sequence>
<element name="String_1" type="string" nillable="true"/>
</sequence>
</complexType>
−
<complexType name="insertDataResponse">
−
<sequence>
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
−
<complexType name="login">
−
<sequence>
<element name="String_1" type="string" nillable="true"/>
<element name="String_2" type="string" nillable="true"/>
<element name="String_3" type="string" nillable="true"/>
</sequence>
</complexType>
−
<complexType name="loginResponse">
−
<sequence>
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
−
<complexType name="logout">
−
<sequence>
<element name="String_1" type="string" nillable="true"/>
<element name="String_2" type="string" nillable="true"/>
</sequence>
</complexType>
−
<complexType name="logoutResponse">
−
<sequence>
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
<element name="getData" type="tns:getData"/>
<element name="getDataResponse" type="tns:getDataResponse"/>
<element name="getMoreRows" type="tns:getMoreRows"/>
<element name="getMoreRowsResponse" type="tns:getMoreRowsResponse"/>
<element name="insertData" type="tns:insertData"/>
<element name="insertDataResponse" type="tns:insertDataResponse"/>
<element name="login" type="tns:login"/>
<element name="loginResponse" type="tns:loginResponse"/>
<element name="logout" type="tns:logout"/>
<element name="logoutResponse" type="tns:logoutResponse"/>
</schema>
</types>
−
<message name="myswsSEI_getData">
<part name="parameters" element="ns2:getData"/>
</message>
−
<message name="myswsSEI_getDataResponse">
<part name="result" element="ns2:getDataResponse"/>
</message>
−
<message name="myswsSEI_getMoreRows">
<part name="parameters" element="ns2:getMoreRows"/>
</message>
−
<message name="myswsSEI_getMoreRowsResponse">
<part name="result" element="ns2:getMoreRowsResponse"/>
</message>
Regards,
Sri
Maybe you are looking for
-
Blue Screen of Death with Nano 2nd gen
We just got a 2nd gen Nano 8GB for xmas and everytime we connect it to our PC it gives the Blue Screen of Death and then reboots. The codes it gives with the BSOD are as follows: Stop: 0x00000050 (0xfffffff0, 0x00000000, 0x8044e86f, 0x00000000) PAGEF
-
Units field XYZ for field ABC of DataSource ZRST Message no. R8147
HI, When I'm trying to SAVE my datasource ZRST, I've got following error. Units field XYZ for field ABC of DataSource ZRST Message no. R8147 In extraction structure of this datasource thare are at least two fields that use the same unit field. Accord
-
LR 5 my external hard drive no longer appears as a hard drive but as a folder under "Volumes"
I am running LR 5 on a MacBook pro and my external hard drive no longer appears as a hard drive but as a folder under "Volumes". will this affect my ability to search and store in this external hard drive? How can I get it back to normal?
-
I have backed up my MAC to Time Capsule with Time Machine, erased HDD and clean installed OX Yosemite. After installation I have to reconfigure Wi Fi, so I reset my Time Capsule changed password. Now I cannot see my previous back up on reinstalled MA
-
Error when launching gaim.
I recently installed ArchLinux and I get this error when I launch gaim: gaim: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory I have tried reinstalling gaim and its dependencies, but the er