Regarding Webservice Client code
Hi Frds
I want to acess Webservice using stand alone application in java...
I already created webservice using NWDS and i can acess using webdynpro..
Now i want to give request and find the response using normal
java program...
Thanks in advance
Shravan G
Hi Shravan,
Refer the following links
MC95 - issue while displaying incoming order quantity
https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html
Thanks & Regards
Veerabharam
Similar Messages
-
Problem while invoking webservice-method in client-code
Hi,
I had written webservice-client-code (using uddi-ext.jar, as i am using uddi for publishing webservices.) which is invoking webservice method successfully with complex datatypes(both for return type and input paramters).
But while calling following webservice-method from my client-code:
public ComplexType[] getData(String[] p_str1, String[] p_str2)
it is throwing exception
The Exception is:
[ERROR] - 27 Mar 2007 12:34:38 -failed to invoke operation 'getData' due to an error in the soap layer (SAAJ); nested exception is: Message[failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException: mapping lookup failure. type=['java:language_builtins.lang']:ArrayOfString schema context=TypedSchemaContext{javaType=[Ljava.lang.String;}]
Although I had done correct registration of mapping of ArrayOfString in client-code:
registry = m_Service.getTypeMappingRegistry();
m_TypeMapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING );
m_TypeMapping.register( ArrayOfStringHolder.class,
new QName( "java:language_builtins.lang", "ArrayOfString" ),
new ArrayOfStringCodec(),
new ArrayOfStringCodec());
But some how it doesnt works.
I had searched on google as well but didnt find any reliable solutions.
Please advice.
Edited by meetmrdeepak at 03/27/2007 2:43 AM
Edited by meetmrdeepak at 03/27/2007 2:45 AMSee item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].
-
NPE with WebService client with JDeveloper 10.1.3
Hi folks,
I am having weird NullPointerException with a WebService client I generated with the WEB Service Proxy wizard in JDeveloper 10.1.3.
The thing is, the client runs fine as long as there are NO NULL FIELDs in the "double" type returned objects. I don't know about other types, but I am sure it fails with doubles.
If there is a NULL value in the returned Bean, then marshaling fails with a NullPointerException.
I guess it is not a Server problem since clients in .NET and AXIS works just fine.
I don't think it has anything to do with it, but, server is in JBoss-4.0.4.GA with JBossWS-1.0.3.
May be a bug in JDEV's WebService client code?
The first line is the deserializer returning a null value. The second is the line with the NPE:
member = myns2__double__double_Double_Serializer.deserialize(ns4_r1_IA_C1_QNAME, reader, context);
instance.setR1_IA_C1(((Double)member).doubleValue());
Any help will be appreciated.
Best regards.This is not an elegant solution.
I’ve the same problem you have, so the only thing that I thought to solve this problem was to change the sentences one by one replacing with if(member != null) between both sentences.
I use an editor that can change regular expressions.
This works fine, but I think there might be a better solution.
I hope this can help.
Regards. -
Java Webservice Developer Pack client code generation
Hi,
I am working on Weblogic Webservices, i am trying to generate client code using 'xrpcc' tool.
Client code has been generated, and i am able to invoke webservices on the server. But i am not able to receive return value from the server and getting follwing error.
D:\TMP\java\webservices\wsdl\test\checkfree\nawf>java test.checkfree.nawf.NAWFCl
ient
java.rmi.RemoteException: Runtime exception; nested exception is:
java.lang.NullPointerException
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:234
at test.checkfree.nawf.GateWayPort_Stub.receiveAccountInfo(GateWayPort_S
tub.java:60)
at test.checkfree.nawf.NAWFClient.main(NAWFClient.java:10)
Caused by: java.lang.NullPointerException
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:354)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:95)
... 2 more
Please, can any one tell immdly?
Thanks
Shivacould u post more info !!! like your wsdl ?
-
Problem while Generating client code for webservice
hi,
my environnement is weblogic 8.1, and i folow the tutorial to generate stub and client code for invoking a webservice hosted by another weblogicserver, here is a portion of the wsdl file :
<wsdl:definitions targetNamespace=" .......
xmlns:tns2="http://exception.toto.fr"......>
<wsdl:types>
<schema targetNamespace="http://exception.toto.fr" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ChainedException">
- <sequence>
<element name="cause" nillable="true" type="xsd:anyType" />
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message ....../>after that, as desribed in the weblogic doc, i create a build.xml, and run the ant command (wich call the clientgen weblo ant task, i end up with the following error :
[clientgen] weblogic.xml.schema.model.XSDException: Unable to resolve definition for ['http://exception.toto.fr']:tns2:ChainedException perhaps due to the lack of an import statement for namespace http://exception.toto.fr
[clientgen] at weblogic.xml.schema.model.XSDSchema.getSchemaForName(XSDSchema.java:1062)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTopLevelObjectImpl(XSDSchema.java:893)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupTypeImpl(XSDSchema.java:881)
[clientgen] at weblogic.xml.schema.model.XSDSchema.lookupType(XSDSchema.java:872)
[clientgen] at weblogic.xml.schema.model.XSDObject.lookupType(XSDObject.java:324)
[clientgen] at weblogic.xml.schema.model.XSDAnyType.getBaseTypeObject(XSDAnyType.java:56)
[clientgen] at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.realBaseType(SchemaInspe
.....thanks a lot for your helpI am facing the same problem.Did any one able to find the solution
-
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 -
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] -
Hi,
I have deployed webservice which is running on Weblogic server. For that I have to write a webservices client in VC++, for my java webservice the arguments are String and Complex type and return type is Complex type.
Can any body tell me how to write webservice client in C++ or VC++ using VC++ compiler.
Earliest response with sample code Appreciated.
Thanks in advance,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 ;-) -
Client code generation question
I am starting to use OEPE to develop JAX-WS services and my first exercise is the HelloService of the J2EE 6 tutorial. The client code of the example is the following:
import javax.xml.ws.WebServiceRef;
import helloservice.endpoint.HelloService;
import helloservice.endpoint.Hello;
public class HelloClient {
public static void main(String[] args) {
try {
HelloClient client = new HelloClient();
client.doTest(args);
} catch(Exception e) {
e.printStackTrace();
public void doTest(String[] args) {
try {
System.out.println("Retrieving the port from the following service: " + service);
HelloService service = new HelloService();
Hello port = service.getHelloPort();
System.out.println("Invoking the sayHello operation on the port.");
String name;
if (args.length > 0) {
name = args[0];
} else {
name = "No Name";
String response = port.sayHello(name);
System.out.println(response);
} catch(Exception e) {
e.printStackTrace();
I have create a web service project and added a web service client for the Hello Service. The above code does not work because the code generated for HelloService is an interface and not as a class. In order to get the example working, I had to use the HelloServiceLocator instead of the HelloService one.
HelloServiceLocator helloSvcLocator = new HelloServiceLocator();
Hello port = helloSvcLocator.getHelloPort();
Did I miss something ?
FredFred,
Sorry for the slow response.
Just to confirm, you're using this URL?
http://java.sun.com/webservices/docs/2.0/tutorial/doc/.
I'm going through the tutorial and most of this seems like it should work through OEPE with some caveats.
Some initial thoughts:
In OEPE we don't support java web service clients without using WLS directly or build tools built on top of WLS.
WLS builds on top of Glassfish web service API calls with its own API calls or ANT tasks.
For Hello you can deploy this web service from a web service enabled project to a running WLS instance and test through Test Client by right clicking on the file and choosing Run As.
For HelloClient to work some libraries need to be adjusted if you're using projects within OEPE and WLS since it's initial grammar doesn't allow it to run on WLS.
Regards,
Andrew -
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. -
Error while generating java client code from wsdl file
I am trying to generate a java client code from WSDL file um_workflowSaveCreateProfile.wsdl which includes um_workflowSaveCreateProfile_interface.wsdl file, so I am keeping both the files in the same folder and trying to generate the client code but it is showing me the below error highlighted .
um_workflowSaveCreateProfile.wsdl
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="E:/DIPPWF/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:oblix="http://www.oblix.com/" xmlns:obinterface="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile" targetNamespace="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile">
<import namespace="D:/DIPP/WSDL/um_workflowSaveCreateProfile_interface" location="um_workflowSaveCreateProfile_interface.wsdl"/>
<service name="OblixIDXML_um_workflowSaveCreateProfile_Service">
<port name="OblixIDXML_um_workflowSaveCreateProfile_Port" binding="obinterface:OblixIDXML_um_workflowSaveCreateProfile_Binding">
<soap:address location="http://localhost:7777/identity/oblix/apps/userservcenter/bin/userservcenter.cgi"/>
</port>
</service>
</definitions>
um_workflowSaveCreateProfile_interface.wsdl
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:oblix="http://www.oblix.com/" xmlns:oblixxmllocalschema="http://www.oblix.com/OblixXMLLocalSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface" targetNamespace="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface">
<types>
<xsd:schema targetNamespace="http://www.oblix.com/" elementFormDefault="qualified"
xmlns="http://www.oblix.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="../XMLSchema/common_parameters.xsd" />
<xsd:include schemaLocation="../XMLSchema/common_authentication.xsd" />
<xsd:include schemaLocation="../XMLSchema/workflowSaveCreateProfile.xsd" />
</xsd:schema>
<xsd:schema targetNamespace="http://www.oblix.com/OblixXMLLocalSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="request">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="params">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="oblix:ObWorkflowName"/>
<xsd:element ref="oblix:ObDomainName"/>
<xsd:element ref="oblix:ObWfComment" minOccurs="0"/>
<xsd:element ref="oblix:noOfFields"/>
<xsd:element ref="oblix:AttributeParams"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="version" type="xsd:string" use="optional"/>
<xsd:attribute name="application" type="xsd:string" use="required" />
<xsd:attribute name="function" type="xsd:string" use="required" />
<xsd:attribute name="mode" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="OblixIDXMLInput">
<part name="authentication" element="oblix:authentication"/>
<part name="request" element="oblixxmllocalschema:request"/>
</message>
<message name="OblixIDXMLOutput">
<part name="body" element="oblix:Oblix"/>
</message>
<portType name="OblixIDXMLPortType">
<operation name="OblixIDXML_um_workflowSaveCreateProfile">
<input message="tns:OblixIDXMLInput"/>
<output message="tns:OblixIDXMLOutput"/>
</operation>
</portType>
<binding name="OblixIDXML_um_workflowSaveCreateProfile_Binding" type="tns:OblixIDXMLPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="OblixIDXML_um_workflowSaveCreateProfile">
<soap:operation soapAction="http://www.oblix.com/"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
</definitions>
I am using WSDL2 Java for generating the client code .
Please suggest where am I wrong .
E:\axis2-1.4\bin>WSDL2Java -uri E:\DIPPWF\um_workflowSaveCreateProfile.wsdl -p R
ND -d adb -s -o build\client--http-proxy-host 10.74.93.35 --http-proxy-port 80
Using AXIS2_HOME: E:\axis2-1.4
Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_02
Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative to 'f
ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd', relati
ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'navbar.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/workfl
owSaveCreateProfile.xsd'.
Retrieving schema at 'searchform.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/wo
rkflowSaveCreateProfile.xsd'.
Retrieving schema at 'component_basic.xsd', relative to 'file:/E:/DIPPWF/XMLSche
ma/workflowSaveCreateProfile.xsd'.
Retrieving schema at 'displaytype.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/c
omponent_basic.xsd'.
Retrieving schema at 'error.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/compone
nt_basic.xsd'.
Retrieving schema at 'component_workflowTicket.xsd', relative to 'file:/E:/DIPPW
F/XMLSchema/workflowSaveCreateProfile.xsd'.
Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative to 'f
ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd', relati
ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'navbar.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/workfl
owSaveCreateProfile.xsd'.
Retrieving schema at 'searchform.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/wo
rkflowSaveCreateProfile.xsd'.
Retrieving schema at 'component_basic.xsd', relative to 'file:/E:/DIPPWF/XMLSche
ma/workflowSaveCreateProfile.xsd'.
Retrieving schema at 'displaytype.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/c
omponent_basic.xsd'.
Retrieving schema at 'error.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/compone
nt_basic.xsd'.
Retrieving schema at 'component_workflowTicket.xsd', relative to 'file:/E:/DIPPW
F/XMLSchema/workflowSaveCreateProfile.xsd'.
*[ERROR] More than one part for message OblixIDXMLInput*
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:
More than one part for message OblixIDXMLInput
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1162)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1085)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
ng(WSDL11ToAxisServiceBuilder.java:686)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
int(WSDL11ToAxisServiceBuilder.java:538)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
ints(WSDL11ToAxisServiceBuilder.java:489)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:363)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
llServices(WSDL11ToAllAxisServicesBuilder.java:107)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:147)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:153)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: More than one part for message OblixIDXML
Input
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:397)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
llServices(WSDL11ToAllAxisServicesBuilder.java:107)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:147)
... 2 more
Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessin
gException: More than one part for message OblixIDXMLInput
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1162)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1085)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
ng(WSDL11ToAxisServiceBuilder.java:686)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
int(WSDL11ToAxisServiceBuilder.java:538)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
ints(WSDL11ToAxisServiceBuilder.java:489)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:363).
Thanks in advance.
akshayHello,
Were you able to resolve this issue ?
I am seeing the same issue and at my wits end.
regards
Amit -
What's wrong with my DII client code?
I have the following WSDL for my ASP/IIS web service...
<?xml version='1.0' encoding='UTF-8' ?>
<!-- Generated 10/31/03 by Microsoft SOAP Toolkit WSDL File Generator, Version 3.00.1325.0 -->
<definitions
name='DCIS'
targetNamespace='http://ds_00119/DCIS/wsdl/'
xmlns:wsdlns='http://ds_00119/DCIS/wsdl/'
xmlns:typens='http://ds_00119/DCIS/type/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<schema
targetNamespace='http://ds_00119/DCIS/type/'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
elementFormDefault='qualified'>
<import namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
<import namespace='http://schemas.xmlsoap.org/wsdl/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>
</schema>
</types>
<message name='DCIS.CTXD'>
<part name='bstrUser' type='xsd:string'/>
<part name='bstrPassword' type='xsd:string'/>
<part name='bstrName' type='xsd:string'/>
<part name='bstrAddress' type='xsd:string'/>
<part name='bstrPhone' type='xsd:string'/>
</message>
<message name='DCIS.CTXDResponse'>
<part name='Result' type='xsd:string'/>
</message>
<portType name='DCISSoapPort'>
<operation name='CTXD' parameterOrder='bstrUser bstrPassword bstrName bstrAddress bstrPhone'>
<input message='wsdlns:DCIS.CTXD'/>
<output message='wsdlns:DCIS.CTXDResponse'/>
</operation>
</portType>
<binding name='DCISSoapBinding' type='wsdlns:DCISSoapPort' >
<stk:binding preferredEncoding='UTF-8'/>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='CTXD'>
<soap:operation soapAction='http://ds_00119/DCIS/action/DCIS.CTXD'/>
<input>
<soap:body
use='encoded'
namespace='http://ds_00119/DCIS/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='bstrUser bstrPassword bstrName bstrAddress bstrPhone'/>
</input>
<output>
<soap:body
use='encoded'
namespace='http://ds_00119/DCIS/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='Result'/>
</output>
</operation>
</binding>
<service name='DCIS' >
<port name='DCISSoapPort' binding='wsdlns:DCISSoapBinding' >
<soap:address location='http://ds_00119/DCIS/DCIS.ASP'/>
</port>
</service>
</definitions>
and the following client code...
import javax.xml.namespace.*;
import javax.xml.rpc.*;
import javax.activation.*;
import javax.mail.*;
import com.sun.xml.messaging.saaj.*;
import java.net.*;
import java.util.*;
import java.rmi.*;
public class DIIClient
public static void main(String[] args)
try
String namespace = "http://ds_00119/DCIS/wsdl/";
String endpointURL = "http://ds_00119/DCIS/dcis.asp";
String portName = "DCISSoapPort";
String functionName = "CTXD";
String[] paramNames = {"bstrUser","bstrPassword","bstrName","bstrAddress","bstrPhone"};
String[] paramValues = new String[] {"x","y","a","b","c"};
String xsdStringType = "<xsd:string>";
ServiceFactory factory = ServiceFactory.newInstance();
Call call = factory.createService(new QName("DCIS")).createCall();
call.setTargetEndpointAddress(endpointURL);
call.setPortTypeName(new QName(namespace, portName));
call.setOperationName(new QName(namespace, functionName));
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://ds_00119/DCIS/");
call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "");
call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");
for(int i=0; i<5; i++)
call.addParameter(paramNames, new QName(xsdStringType),ParameterMode.IN);
call.setReturnType(new QName(xsdStringType));
String returnValue = (String) call.invoke(paramValues);
System.out.println(returnValue);
catch(Exception ex)
ex.printStackTrace();
when I run this I get:
java.rmi.RemoteException: WSDLReader:The operation requested in the Soap message with soapAction http://ds_00119/DCIS/action/DCIS isn't defined in the WSDL file. This may be because it is in the wrong namespace or has incorrect case
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:369)
at DIIClient.main(DIIClient.java:45)
I've tried everything I can think of for the soapAction string and just can't get it to work. What am I doing wrong here?
I know the service works because I've been using C++ and VB clients for months, but I need to get a Java client up and running soon.
I've only been looking at Java WS clients for a day, so if anyone knows of a better way to do this then please tell me! I've tried 4 completely different implementations so far and none of them worked.
ChrisDear Chris,
The problem is in your code itself or the way u've created this web service.
I'm sending you some sample code. Just change the values of variables and delete unwanted lines according to you. Just go step by step.
Here is the code
import javax.xml.rpc.Call;
import javax.xml.rpc.Service;
import javax.xml.rpc.JAXRPCException;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.ParameterMode;
public class DllClient {
private static String qnameService = "IPSProv_pipeService";
private static String qnamePort = "IPSProv_pipeIFPort";
private static String BODY_NAMESPACE_VALUE =
"urn:Foo";
private static String ENCODING_STYLE_PROPERTY =
"javax.xml.rpc.encodingstyle.namespace.uri";
private static String NS_XSD =
"http://www.w3.org/2001/XMLSchema";
private static String URI_ENCODING =
"http://schemas.xmlsoap.org/soap/encoding/";
public static void main(String[] args) {
System.out.println("Endpoint address = http://218.248.33.59:8080/ipsprovPipeService/provision?WSDL");
try {
ServiceFactory factory =
ServiceFactory.newInstance();
Service service =
factory.createService(
new QName(qnameService));
QName port = new QName(qnamePort);
Call call = service.createCall(port);
call.setTargetEndpointAddress("http://215.246.33.59:8080/ipsprovPipeService/provision?WSDL");
call.setProperty(Call.SOAPACTION_USE_PROPERTY,
new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY,
call.setProperty(ENCODING_STYLE_PROPERTY,
URI_ENCODING);
QName QNAME_TYPE_STRING =
new QName(NS_XSD, "string");
call.setReturnType(QNAME_TYPE_STRING);
call.setOperationName(
new QName(BODY_NAMESPACE_VALUE,"sp_mgmnt"));
call.addParameter("String_1", QNAME_TYPE_STRING,
ParameterMode.IN);
call.addParameter("String_2", QNAME_TYPE_STRING,
ParameterMode.IN);
call.addParameter("String_3", QNAME_TYPE_STRING,
ParameterMode.IN);
call.addParameter("String_4", QNAME_TYPE_STRING,
ParameterMode.IN);
String[] params = { "A","B"};
String result = (String)call.invoke(params);
System.out.println(result);
} catch (Exception ex) {
ex.printStackTrace();
Plz show me the code after u make changes in it and do reply whether it works or not.
Regards,
Piyush -
HTTP Receiver Adapter - HTTP client code 110 reason error when sending
Hi,
I am getting the following error when using the HTTP adapter as a receiver to perform an HTTP Post in a destination system :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code>
<SAP:P1>110</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>HTTP client code 110 reason</SAP:Stack>
<SAP:Retry>N</SAP:Retry>
</SAP:Error>
Does anyone know what causes this error and more importantly how to trace it ?
Cheers
Colin.hi Colin,
Check in SMICM if your HTTP service is running. Also in RFC destination one of the parameter (SSL client Certificate) might be wrong which could also cause this problem.
Also check this thread:-
XI Error when upgraded to SP14 (Error Code 110) CLIENT_RECEIVE_FAILED
Have a look into this SAP Note - 897583
Regards.
Praveen
Maybe you are looking for
-
Dumping data from forms 4.5 to excel
Hi, we use oracle 8.1.3 (WINDOWS 2000) / forms 4.5 (WINDOWS 98). we call a procedure from forms 4.5 to dump oracle data into excel file. The procedure is working fine. The problem is after dumping data into excel file and exiting the program, excel i
-
Customer replication from CRM to R/3
Hi Experts, we are using CRM 4.0 and we would like to replicate Business Partners from CRM to R/3. On CRM side we have created some new fields with EEWB. I already know that in this case I have to write an FM in CRM and set in CRMC_BUT_CALL_FU as CRM
-
Does the local SAP GUI is required for recordings by Datago ?
hi, Datango for records and documentation do I need a Local SAP Gui Package guide me. thanks, jansi
-
How can I view iCloud content can not log into iCloud.com
-
Graph Xy à partir d'un fichier excel
Bonjour, A partir d'un fichier exel je dois tracer des courbes de caractérisations. J'arrive a tracer les courbes mais elles ne font que "défilées" une par une. Je m'explique, la première courbe est tracé mais 1s après c'est la deuxième qui est trac