Dynamic WebService Proxy
How can I configure dynamic Web Service Proxy for a WSDL in Web Center Application. Any change in the WSDL, we need to create a new proxy and thus re-create Data Control again in the Model.
Any samples or answers are highly appreciated.
You might want to ask that on the WLS forums.
Similar Messages
-
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] -
Generating Webservices proxy in JDeveloper 10.1.3.4.0.4270
Hi,
I have been using Jdeveloper 10.1.3.0.4 for creating .net webservice proxy for over a year now. Recently i upgraded the Jdeveloper IDE to 10.1.3.4.0.4270 and since then i m not able to connect to the webservice. Here are the steps i m taking to create the proxy which i did in the older version as well.
New --> Business Tier --> Web Service --> Web Service Proxy
WSDL Document URL -- https://ServerName/Webservice.asmx?wsdl
I am using all the default settings from Steps 2 thru 4
Step 5 -- Adding a package name, clearing the root package for generated types, checking all the other options on the screen.
Finally click Finish.
All of this still works if i were make the proxy in the previous Jdeveloper version. However with this new version i am getting the following error.
javax.xml.rpc.ServiceException: java.lang.ClassNotFoundException: bmtez.spidr.SPIDRInterfaceLocator
java.io.FileNotFoundException: http://utmswst3vmnt.utmdacc.org/bmtweb/servlet/bmtez.server.BMTLogger
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at bmtez.client.BMTLog.log(BMTMainSearchPage.java:1958)
at bmtez.client.SerologyTab.actionPerformed(SerologyTab.java:2749)
at javax.swing.JComboBox.fireActionEvent(Unknown Source)
at javax.swing.JComboBox.setSelectedItem(Unknown Source)
at bmtez.client.BMTComboBox.setSelectedItem(BMTGuiControls.java:871)
at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
at bmtez.client.SerologyTab.populateDonorSerologyScreen(SerologyTab.java:1299)
at bmtez.client.SerologyTab.populateScreenData(SerologyTab.java:949)
at bmtez.client.SerologyTab.applyBusinessRulesToScreen(SerologyTab.java:440)
at bmtez.client.BMTMainTab.stateChanged(BMTMainTab.java:1753)
at javax.swing.JTabbedPane.fireStateChanged(Unknown Source)
at javax.swing.JTabbedPane$ModelListener.stateChanged(Unknown Source)
at javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Source)
at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Source)
at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source)
at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source)
at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at bmtez.client.CustomEventQueue.dispatchEvent(BMTMainTab.java:2394)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I m not able to understand why its looking for a class SPIDRInterfaceLocator which was not built by the proxy?. Or does it have some other underlying message that i m not able to see. Please help.
Thanks,
-Seema Abdi.Can you compare the Web Browser and Proxy settings in your jdev installation.(Tools->Preferences->Web Browser and proxy)
I case that does not solve your issue:
Where is this service hosted? Is it on your localbox or you are accessing it over the net.
Can you try migrating the project created in the earlier Jdev installation and see if you can run that successfully.
-Vishal -
Error in Jdeveloper when making a WebService Proxy.
Hi,
I am trying to call a webservice from Forms. But when I try to create webproxy in Jdeveloper.As I enter the WSDL URL(http://localhost:7101/WebService-Annotation-context-root/MyCompanyPort?WSDL)in the webservice proxy wirzrd I recieve following error:
oracle.jdeveloper.webservices.model.WebServiceException
at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1656)
at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2846)
at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2611)
at oracle.jdeveloper.webservices.model.java.JavaWebService.<init>(JavaWebService.java:509)
at oracle.jdeveloper.webservices.model.java.JavaWebService.<init>(JavaWebService.java:461)
at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy$ProxyJavaWebService.<init>(WebServiceProxy.java:2268)
at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy.updateServiceModel(WebServiceProxy.java:1701)
at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy.setDescription(WebServiceProxy.java:525)
at oracle.jdevimpl.webservices.wizard.jaxrpc.proxy.ProxyJaxWsSpecifyWSDLPanel.setDescription(ProxyJaxWsSpecifyWSDLPanel.java:238)
at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel.buildModel(SpecifyWsdlPanel.java:1109)
at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel$5.run(SpecifyWsdlPanel.java:661)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at oracle.jdeveloper.webservices.model.WebService.getURI(WebService.java:1009)
at oracle.jdeveloper.webservices.model.WebService.getMappingFile(WebService.java:3960)
at oracle.jdeveloper.webservices.model.java.JavaWebService.getMappingFile(JavaWebService.java:1810)
at oracle.jdeveloper.webservices.model.java.JavaWebService.getSeiInfo(JavaWebService.java:1708)
at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1496)
... 12 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 0: MyCompanyWS
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parseHierarchical(URI.java:3066)
at java.net.URI$Parser.parse(URI.java:3024)
at java.net.URI.<init>(URI.java:578)
at java.net.URI.create(URI.java:840)
... 17 more
The above error is what I get for my own webservice.
If I use the webserivce wsdl url(http://www.esendex.com/secure/messenger/soap/SendService.asmx?wsdl) which exsits from internet. I get the following error:
"No WSDL document found".
Please help how to overcome this error.
Thanks & Regards,
NomanHi Noman,
Can you try running the URL in the browser and check if you are able to "view" the wsdl?
For the second issue, i feel it could be because of the firewall / proxy issue. Try setting the proxy (if you are using one) in your jdeveloper-> Tools->Preferences->Web Browser and Proxy section.
-Arun
P.S : Post the JDeveloper version you are using in "all" the questions, which would help us to give precise answer. From the URL(http://localhost....), i guess you are using JDev 11.1.1.2.0, but you need to confirm. -
Change the default namespace in soap message generated by webservice proxy
I have a requirement where the default namespace generated by the webservice proxy has to be changed. For example, below is a soap request message generated by the proxy:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns0="http://siebel.com/asi/"
xmlns:ns1="http://www.siebel.com/xml/getAllSecurityValuesResponse/PS"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<env:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
env:mustUnderstand="1"
xmlns:xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:UsernameToken
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:Username>kaoliver</wsse:Username>
<wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">db2</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns0:SearchSecurityServicegetAllSecurityValues_1>
<Login>kaoliver</Login>
</ns0:SearchSecurityServicegetAllSecurityValues_1>
</env:Body>
</env:Envelope>
In the above message, I want to change the oasis namespace to a different namespace. Where are the default namespaces defined in the proxy classes generated by Jdev so that I can change them?
Thanks in advance,
Warm Regards,
Shashi Anand B>
If I define a prefix P2L in the expression editor to correspond to "http://foo.com/namespace/business", I'm able to reference the ExecuteResponse element as "./P2L:ExecuteResponse", but then I get stuck.
If I try use a Rename action to change the namespace for "./P2L:*", only the ExecuteResponse element is renamed to <sof:ExecutResponse xmlns:sof="http://foo.com/namespace/proxy">. Upstream in the calling application, there's an XML stream reader exception because (I assume) ExecuteResult is not found and parsed.
>
You pattern "./P2L:\*" matches just one element so it's ok that the payload's namespace wasn't touched. If you want to rename namespace for all elements try "//P2L:*". However, I'm not sure whether this is what you want. Try do describe what you do, what you want and what you get instead.
>
I also tried using a Replace action against "./P2L:ExecuteResponse/@xmlns" to replace its contents with "http://foo.com/namespace/proxy". I also tried "./P2L:ExecuteResponse/@P2L:xmlns". Neither worked.
>
I think it's not a good approach to replace content of xmlns as this attribute is not a common xml attribute. -
How to pass username/password through WebService proxy client to E-BS.
Hi
We are using ADF Webservice proxy client to integrate E-Business suite with ADF. It asks for username/password to access details from E-BS. In the generated webservice XSD file, a method is available with 2 parameters.
1) SOAP header( Contains Username, responsibility and 2 more fields)
2) Class object(Nested Object)
However i didn't find "*Password*" field anywhere in it. Then how can I pass "*Password*" along with username to invoke this method?
When i checked SOAP, the password is defined like this
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXX</wsse:Password>a
Thanks
Rajahi Dario
Thank you for your post. It is really helpful. Now I got stuck with a doubt, in this piece of code
final Binding binding = ((BindingProvider) servicePort).getBinding();
List<Handler> handlerList = binding.getHandlerChain();
if (handlerList == null)
handlerList = new ArrayList<Handler>();
They didn't mention properly about "*servicePort*". What object is this?
I checked in Oracle document, even in that I was not clear with that piece of code.
public class HandlerWS{
@Resource WebServiceContext ctx;
@WebMethod()
public String getProperty(String propertyName) {
return (String) ctx.getMessageContext().get(propertyName);
public class Main {
public static void main(String[] args) {
HandlerWS test;
try {
test = new HandlerWS(new URL(args[0] + "?WSDL"), new
QName("http://example.org", "HandlerWS") );
} catch (MalformedURLException murl) { throw new RuntimeException(murl); }
HandlerWSPortType port = test.*getHandlerWSPortTypePort*();
What is this HandlerWSPortType object???. Can you give me little more explanation about it?
Thanks -
Consuming WebServices in ABAP WebDynPro via webservice proxy code
Hi,
My requirement is to consume a webservice using WSDL(basic authentication) in WebDynPro ABAP. then based on the SOAP response I need to show a pop up message whether the response valid or not.?
I first tested the webservice by creating LPCONFIG Logical Port and generated WebService Proxy class.
It got response correctly with basic authentication enabled each time I send a request.
Secondly I generated webservice proxy code using service calls on creating webdynpro test application with some UI elements. Service call created Nodes,attributes and method correctly.
it's giving me error when it tries to invoke webservice method through generated code.
Question is that How do we code authentication to the webservice method via WebDynPro ABAP code.
I appreciate anyone who worked on this area and taken basic authentication via coding. or worked successfully through coding.
Thanks
Praveenhi
Refer this:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6066fbe8-edc4-2910-9584-a9601649747d
It might be usefull for u.
Regards
Vivekananthan.S -
Change configuration of Webservice Proxy
Hi!
I've generated a webservice proxy to call to a webservice. My problem is that when it call the service, it send and xml like this:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://afirmaws/services/AlmacenarDocumento">
<env:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:mustUnderstand="1">....
I want the mustUnderstand variable set to "0", but i dont know where i can specify it. Several hours lost with it.
Someone knows how can i do it???
Thanks!!!I can't change the mustUnderstand property value there. In this windows you specify the keystore, outbount, inbound properties, but i can't find how to put de mustUnderstand property="0"
-
Generated Webservice proxy: Maximimum size of byte array
Hi,
We have generated a webservice proxy with JDeveloper (version 10.1.3.4.0) from a WSDL supplied by a .Net webservice. One of the Webservice returns a byte array. We are facing a problem when the size of the returned byte array exceeds the limit of 5 MB. We have tried to increase the heap size of the OC4J but that did not solve the problem.
Does anyone know if there is a maximum value limit which can be passed through a byte array? Is it configurable?
A workaround would be flushing the byte array in chunks, but the webservice returns the byte array as a single returned value.
Regards,
SjoerdHi,
The webservice was called by Oracle Forms. The problem was solved by Metalink Note 562561.1 - Webservice Fails To Run With java.lang.OutOfMemoryError.
Regards,
Sjoerd -
I am using JDeveloper 10.1.3 to generate a proxy for an existing webservice.
After running the wizard "WebService proxy" (from Gallery), I find that not all of expected classes are being generated. (conclusion drawn after comparing classes generated against webservice provider samples)
Is there any additional step to be performed to generate all classes?
thanks,Select the Proxy node in the Application Navigator and View the Structure Pane, which will display all the related files for the proxy node..
Regards,
Sunil.. -
WebService Proxy and x509 cert. authentication
Does anybody know if JDeveloper 10.1.3 generated WebService proxy by default is trying to use wallet other then keystore?
We have generated a web service proxy and trying to make a call to a WebService over SSL to the site which require x509 certificate.
Setting up keystore properties like :
System.setProperty("javax.net.ssl.keyStore","c://temp//keystore/myKeystore.jks");
System.setProperty("javax.net.ssl.keyStorePassword","password");
does not have any affect. And debug shows the following:
{Thread-10} [1:42:59.187] URLC: (https:twss.trac2es.transcom.mil:443) Connecting ...
{Thread-10} [1:42:59.187] Conn: Creating Socket: twss.trac2es.transcom.mil:443
{Thread-10} [1:42:59.328] Conn: using SSL version Oracle
{Thread-10} [1:42:59.390] Using wallet:
{Thread-10} [1:42:59.437] Conn:
And then shows the errors:
{Thread-10} [1:42:59.437] Unable to connect to URL: https://twss.trac2es.transcom.mil/trac2es-pmr/WebServicePmrSoapHttpPort due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: SSLSessionNotFoundErr
Any help will be apreciated
AlexBruce,
We are trying to setup X509 Client Cert to involve CAC(Smart Card) processing as a part of the initial part of our Jdev 10 or 11g app utilizing jsf/toplink. We are running OAS 10.1.2.0.2 presently but we can move to OAS 10.1.3 or OAS 10.1.4 without any problem.
I am hearing a lot of references to Jdev and creating the WebService.
Do you know if I am better off using what comes with OAS for the authentication or using Jdeveloper? If there is any good document you can refer me to we'll greatly appreciate it.
Thank you in advance for your response. -
Public Part : Deployable Webservice Proxy DC
Hi All,
I have a deployable Webservice Proxy DC, which is used to create webservice proxy. I am using those webservice proxy in my Portal application. May I know what needs to be defined in public part of webservice proxy dc, so that I can use it as used dc in portal DC?
Best Regards,
PriyankaHi Anand,
Thanks for your response. I have already checked that object for null - it is not. The problem is I dont have this SECQANDAImpl class that implements the SECQANDA interface in my DC. This implementation class gets generated when I deploy the deployable proxy object. Though I should be able to cast to the interface, it is throwing this error. Any other ideas?
Giri. -
[solved] Is Webservice proxy stateful?
Hi! I've problems to access our stateful webservice via the webservice proxy I got from the service endpoint. Since we set the webservice to stateful I only can run the login, then every other method comes back with a NullPointerException.
It seems that the JSF-Application we are using and from where we try to access the webservice methods needs also to be set to stateful, but we found nothing helpful at the moment.
We also thought, the the WebService-Proxy will provide us stateful access to the webservice. Isn't that so? Did we get something wrong?
Can anyone help us with this problem?
Thanks.
Verena
Message was edited by:
VerenaI solved my problem by using Oracle AS SSO instead of our own Login.
For anybody who have comparable problems:
http://docs.huihoo.com/oracle/docs/B25016_04/doc/dl/web/B14013_02/jaas_integrate.htm
Regards
Verena -
SAML token in webservice proxy
Hi,
I've a custom security provider which provides me a SAML token. I also have a webservice proxy which needs to use the token. How do I configure the webservice proxy to use this token? I know that WS-Security supports SAML tokens. But I'm unable to figure out how to set this up in the webservice proxy.
Any help is greatly appreciated.
Thanks,
Anand.I was able to write a custom handler that added the token as a ws-security header.
-
JDev generated WebService Proxy not functioning
Hello,
my WS Proxy Project is not funtioning. I've generated the Project from a WSDL generated by an Oracle SAP Adapter connection to a SAP ECC6.0 system. The adapter works fine, the adapters' Trace File shows the correct data from the SAP System as a SOAP response to my request.
But the deserialization always failes, because the structure in the SOAP response doesnt match the excpected one.
unexpected element name: expected={urn:iwaysoftware:ibse:jul2003:GetList:response}DATE_RANGE, actual={urn:iwaysoftware:ibse:jul2003:GetList:response}DATE_RANGE
at flight.proxy.types.iwaysoftware.ibse.jul2003.getlist.response.runtime.FlightGetListResponse_LiteralSerializer.doDeserialize(FlightGetListResponse_LiteralSerializer.java:98)
at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
at flight.proxy.types.iwaysoftware.ibse.jul2003.getlist.response.runtime.GetListResponse_LiteralSerializer.doDeserialize(GetListResponse_LiteralSerializer.java:70)
at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.internalDeserialize(LiteralObjectSerializerBase.java:250)
at oracle.j2ee.ws.common.encoding.literal.LiteralObjectSerializerBase.deserialize(LiteralObjectSerializerBase.java:159)
at flight.proxy.runtime.FlightServiceSoap_Stub._deserialize_GetList(FlightServiceSoap_Stub.java:190)
at flight.proxy.runtime.FlightServiceSoap_Stub._readFirstBodyElement(FlightServiceSoap_Stub.java:126)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:333)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
at flight.proxy.runtime.FlightServiceSoap_Stub.getList(FlightServiceSoap_Stub.java:83)
at flight.proxy.FlightServiceSoap1Client.getList(FlightServiceSoap1Client.java:61)
at flight.proxy.FlightServiceSoap1Client.main(FlightServiceSoap1Client.java:47)
The FlightService retrieved data via BAPI_FLIGHT_GETLIST, but with another BAPI it is exactly the same.
So is there a bug in the code generated by the WebService Proxy Wizard ? The structure of the BAPI is sometimes quite complex. In the other project there where 128 classes generated by the wizard.
Who can help me on this ?
I've posted this right here, because the retrieved data is correct, so i believe this is not a adapter related issue.
Thanks ChristianHi,
I'll forward this, but if the "the structure in the SOAP response doesnt match the excpected one" then these seems to point to a transformation problem. If this is blocking you in a project, I suggest to involve customer support
Frank
Maybe you are looking for
-
IPhone 4 freezes when I try to make or receive a call
When I try and call another person my iphone freezes. Sometimes its instant, sometimes the speaker is lit up and then it freezes. It also freezes when somebody tries to call me. Please could somebody help as this is doing my head in.
-
Hi people! At work, we have several networked computers, and two of them have iPod videos on them. When I try and get say my computer & iTunes to use that drive and add videos to my library, iTunes stops responding and crashes. This happens with both
-
Problem while updating the forecast value in m.master by direct input menth
Hi All Good Day I am updating the forecast value in material master by direct input method. my program is working fine when I am running it online. but when i am runnig in back ground I am getting one error which is mentioned below
-
Problem sending a null char in an ibwrt buffer?
Has anyone had a problem with sending a null char with ibwrt in NI-488.2 v1.6 on PCI-GPIB card? If so, was there a solution you could find? Thanks w tseng
-
Resizing resize db_cache_size parameter
Hi i'm facing problem of IO and taking statspack report and analyzing it from statspackanalyzer they are advising me to increase db_cache_size to avoid many full table scans. could you help me on how to check an appropriate value of my db_cache_size