Org.apache.axis.types.URI$MalformedURIException: No scheme found in URI
Hi,
We are running PI 7.11 and we installed Axis libraries icluding addressing-1.1.1.jar. The following refers to Receiver SOAP adapter with Axis protocol.
Before we had the addressing capabilities, we used the handler type "java:com.sap.aii.axis.soap.HeaderInsertionHandler" to include the <wsa:Action> and <wsa:To> tags on the header of the web service call, and it was working fine. Now, with the addressing libraries, we are using handler type "java:org.apache.axis.message.addressing.handler.AddressingHandler" so that those tags can be inserted automatically, but we get the error:
Axis: error in invocation: org.apache.axis.types.URI$MalformedURIException: No scheme found in URI.
It seems that this handler is not inserting the correct URL. Or is it something else? Do we need to add any more lines to the Module Configuration, or the handler type for the Addressing Handler should be enough?
Thanks for your help,
Miguel
Edited by: Miguel Chaves on Oct 4, 2010 4:59 PM
Hi Yza,
Thanks for the response. Actually I didn't think it could be the soap action. The soap action is simply GetFile, that's what I have on the communicatoin channel configuration when I get the error . And when I use the Header Insertion Handler instead of the Addressing Handler, this is what I insert on the module configuration:
<wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">GetFile</wsa:Action>
And this works.
What do you mean by valid URI value? Isn't GetFile a valid URI value? What should I put on the SOAP action field of the communication channel configuration, then, if this is the SOAP action that comes in the WSDL?
Another question: Where can I get the stack trace?
Thanks,
Miguel
Similar Messages
-
Package org.apache.axis.message not found in import.
Hi,
I am using axis to give response to another bpel process after any operation is completed of a BPEL process.I am using JDeveloper to deploy my bpel process.It has succesfully deployed process without any error but when bpel server is unpacking it and deploying it to oc4j,it get error:
Package org.apache.axis.message not found in import.
06/02/08 12:40:40 import org.w3c.dom.Element;import java.util.Calendar;import java.util.Date;import com.collaxa.cube.engine.ext.process;
import com.oracle.services.bpel.task.*;import com.oracle.bpel.client.BPELFault;import com.collaxa.cube.xml.schema.XMLSchemaUtils;import com.
oracle.bpel.client.util.WhereCondition;import com.oracle.bpel.client.Locator;import com.oracle.bpel.client.delivery.IDeliveryService;import
com.oracle.bpel.client.NormalizedMessage;import com.oracle.bpel.client.IInstanceHandle;import com.oracle.bpel.client.ServerException;import
com.oracle.services.bpel.Process.*;import org.apache.axis.message.*;import javax.xml.soap.Name;
I have manually copied all axis jars to
1)OraBPEL\integration\orabpel\system\appserver\oc4j\j2ee\home\applib
2)OraBPEL\integration\orabpel\lib
But no use.
Can anybody help!I've put a lot og jar files in the bpel-inf/lib but it looks as if they are not in the class path when I need them. The result is a ClassNotFoundException? Do I have to specify anything else? I've put a class in the bpel-inf/classes and it looks to me as if it is found by the BPM.
-
Error: 'enum' is a keyword in jdk 1.5 org.apache.axis.enum package
Hello
I got an error when i am using jdk1.5 .
Error: 'enum' is a keyword in org.apache.axis.enum package
Please any one give a hint to solve this problem.
Thanks
Ramkirename all references in your generated code from
org.apache.axis.enum
to
org.apache.axis.constants
The types have been replicated in the constants package.
Now if I could only get my damn eclipse soap tool to stop using org.apache.axis.enum -
Error with org/apache/axis/AxisFault
Hello Hi:
I have server over Linux Red Hat Enterprise. and other server in local the if connect with the other server the servers are weblogic but need a create a webservice the that need the .jar axis.jar but not find the class AxisFault, and generate the next error.
java.lang.NoClassDefFoundError: org/apache/axis/AxisFault
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at com.saident.bea.es.epcps.EPCWebServiceCaller.checkIt(EPCWebServiceCaller.java:64)
at jsp_servlet._custom._corp.__imprimirepc._jspService(__imprimirepc.java:205)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.hphis.corp.hibernate.filter.HibernateSessionFilter.procesarPeticion(HibernateSessionFilter.java:203)
at com.hphis.corp.hibernate.filter.HibernateSessionFilter.sessionPerRequest(HibernateSessionFilter.java:181)
at com.hphis.corp.hibernate.filter.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:65)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.hphis.corp.filters.login.LoginFilter.doFilter(LoginFilter.java:259)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.hphis.corp.filters.logueo.LogueoFilter.doFilter(LogueoFilter.java:66)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.hphis.corp.filters.gzip.GZipFilter.doFilter(GZipFilter.java:56)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3212)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)Hi,
Unable to access workspace. I have tried reconfiguring web server also it has not worked.
If i try the work space using URL "http://<Server Name>:19000/workspace/" it throws the following error:-
==================
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
===================
Can you please advise
Regards,
Ramachandran J -
Org.apache.axis.enum.Style.ENCODED
Write a java program using JDK1.5 which should use �enum� as variable
I am getting a big Problem while using org.apache.axis.enum.Style.ENCODED constant in the program it is giving error while compiling that
enum is the keyword U can not use it as identifier
Give me the suggestion Immediatelrename all references in your generated code from
org.apache.axis.enum
to
org.apache.axis.constants
The types have been replicated in the constants package.
Now if I could only get my damn eclipse soap tool to stop using org.apache.axis.enum -
Hi,
I am registering the following error in a SOAP Sender Communication Channel, it's very strange because of in the Development Environment everything worked fine.
com.sap.aii.af.sdk.xi.util.URI$MalformedURIException: no scheme
The Scenario is the following:
Sender: SOAP
Receiver: ABAP Proxy (Using the XI configuration)
I configured all the scenario to use only the Adapter Engine instead the Integration Server and, as I explained in the previous paragraph it worked fine in Development environment.
Does anybody know what could be going on?
Thank a lot for your help.
Kind Regards,
VictoriaHello Victoria,
Can you please check if the inbound address for SOAP messages should be as follow.Other wise you will exceptions.
: http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel
Under
party:service:channelenter the party name, the service name, and the
name of the communication channel. If no party has been created, enter the
following: channel=:service:channel
Kind Regards
Praveen Reddy -
Hello Experts,
We are still configuring our XI in a RFC-XI-SOAP Scenario. We did all the Interface- and Message- Mapping, we configured our Business System and Business Services. But if we send a message from our R/3 4.6c system to the Web Service via the XI, we receive the following error messages: MP: exception caught with cause com.sap.aii.messaging.util.URI$MalformedURIException: no scheme. The error appears in the SOAP Adapter together with a com.sap.aii.af.ra.ms.api.RecoverableException with the message no scheme.
Does anyone know, why this error appears? What can we do to avoid this error?
Thanks for the answer! I appreciate every kind of answer.
Im looking forward to read your answers.
Best Regards
PhilippHello Bhavesh,
after we have checked the SOAP Receiver, we got the following exception:
<i>ErrorCode: GENERAL ErrorText: com.sap.aii.af.ra.ms.api.DeliveryException: Connection timed out: connect</i>.
Does this error show that we are through with our customizing?? Or is this still a problem on our xi??
Best Regards
Philipp -
Java.lang.NoClassDefFoundError: org/apache/axis/client/Service
Hi,
I am developing a WebService Client and for that i am using the Apache axis client. but when i am trying to instnatiate the org.apache.axis.client.Service class it says a NoClassDefinition Found error.
Can anyone tell me the reason for this? Is there any settings for axis client in the Portal-App.xml or any other place?
Thanks
KiranHave you included all the Axis client jars in your /dist/PORTAL-INF/lib folder and added them to to .classpath?
axis.jar , commons-discovery.jar , commons-logging.jar , crimson.jar , jaxp.jar , jaxrpc.jar , log4j.jar , saaj.jar , wsdl4j.jar , xalan.jar , xerces.jar . -
hi,
firstly, i should introduce what i am doing now.
I want to write a Jeanbean, which can invoke 2 web services.
I found in tomcat, when I submitted the parameters from a web page form, there was Internal Server Error.
The problem is I can not created an instance of org.apache.axis.client.Service, or an instance of org.apache.axis.client.AxisClient.
But very stange, I tried to create an instance of org.apache.axis.client.Transport, which should exist in the same package with Service and AxisClien, there was no exceptions.
can anyone give me some hints?Is it a "class not found" error? Have you tried viewing the jar file that you think org.apache.axis.client.Service is in to be sure that it's really in there?
jar tvf <filename> -
NoClassDefFoundError: org/apache/axis/AxisEngine
Hi,
I've had CF9 developer edition running on a VMWare instance for at least a year, then suddenly the installation seems hosed with the following error (part of a stack trace in the ColdFusion out log:
NoClassDefFoundError: org/apache/axis/AxisEngine
I tried rebooting, restarting CF multiple times, deleting and adding the connector, no dice.
Anyone got a clue?
JeffDunno what might be causing that, but wouldn't the quickest fix - given you say it's a VM - just be to roll it back to its initial state?
Adam -
Org.apache.axis2.AxisFault: The service cannot be found for the endpoint
Hi Team,
I'm getting following error while runnig WebServices
[ERROR] The service cannot be found for the endpoint reference (EPR) /TestServices/services
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /TestServices/services
Please guide me where i went wrong
Thanks in Advance
RaviI am also facing the same problem. can any body help us?
Thanks
jaya -
Apache axis deserialization problem
Can anybody help?
We are using Apache's Axis web service framework for consuming web services. One of the web services has "nested" or complex types in the response, and the Axis framework is not processing it properly.
Is there something that we need to configure to get this to work? Any suggestions are much appreciated.
It gives the following message:
org.xml.sax.SAXException: Invalid element in com.chase.egw._GWProfile - Product
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:260)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at org.apache.axis.client.Call.invoke(Call.java:2272)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.chase.egw.GWProfilePortTypeSoapBindingStub.getProfile(GWProfilePortTypeSoapBindingStub.java:185)
at com.echase.common.mf.sso.SSOGatewayServiceDelegate.getGWProfile(SSOGatewayServiceDelegate.java:178)I am having the same problem as you describe.
Checkout out this link:
http://dev-forums.ebay.com/thread.jsp?forum=1002&thread=100000782
It talks about adding the following to the complex type defintion in the WSDL
<xsd:any processContents = "lax"/>
The good news is this solved the exception problem.
The bad news is that my complex objects are not being deserialed. I've posted to the AXIS users mailing list.
Here is what I posted:
Hi,
I need a little help getting started with AXIS.
I've done some SOAP web services development a few years back using SUN JAXM, but I will be using AXIS for a webservice project in the near term.
In order to get familiar with AXIS I did the GOOGLE thing and aquired a sample WDSL to try out.
I am using 1.2RC3 version of AXIS with Tomcat 5.0.28.
Here is the WSDL I first used:
<wsdl:definitions
name="PhotoCatalogService"
targetNamespace="http://examples.com/PhotoCatalog"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:types="http://examples.com/PhotoCatalog/types"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://examples.com/PhotoCatalog">
<wsdl:types>
<xsd:schema targetNamespace="http://examples.com/PhotoCatalog/types"
xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
xmlns:types="http://examples.com/PhotoCatalog/types">
<xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd" schemaLocation="WS-ISwA.xsd"/>
<!-- Status contains the references the old photo available as attachment. -->
<xsd:element name="Status" type="wsi:swaRef" />
<!-- passed in as parameter of replacePhoto operation, contains the order. -->
<xsd:element name="PhotoInfo">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="customerName" type="xsd:string"/>
<xsd:element name="photoID" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="addPhotoRequest">
<wsdl:part name="oldPhoto" element="types:PhotoInfo"/>
<wsdl:part name="photo" type="xsd:hexBinary"/>
</wsdl:message>
<wsdl:message name="addPhotoResponse">
<wsdl:part name="status" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="replacePhotoRequest">
<wsdl:part name="oldPhoto" element="types:PhotoInfo"/>
<wsdl:part name="newPhoto" type="xsd:hexBinary"/>
</wsdl:message>
<wsdl:message name="replacePhotoResponse">
<wsdl:part name="status" element="types:Status"/>
</wsdl:message>
<wsdl:portType name="PhotoCatalog">
<wsdl:operation name="addPhoto">
<wsdl:input message="tns:addPhotoRequest"/>
<wsdl:output message="tns:addPhotoResponse"/>
</wsdl:operation>
<wsdl:operation name="replacePhoto">
<wsdl:input message="tns:replacePhotoRequest"/>
<wsdl:output message="tns:replacePhotoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PhotoCatalogBinding" type="tns:PhotoCatalog">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="addPhoto">
<wsdl:input>
<mime:multipartRelated>
<mime:part>
<soap:body parts="oldPhoto" use="literal"/>
</mime:part>
<mime:part>
<mime:content part="photo" type="image/jpeg"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
<wsdl:output>
<mime:multipartRelated>
<mime:part>
<soap:body use="literal"/>
</mime:part>
<mime:part>
<mime:content part="status" type="text/plain"/>
<mime:content part="status" type="text/xml"/>
</mime:part>
</mime:multipartRelated>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="replacePhoto">
<wsdl:input>
<mime:multipartRelated>
<mime:part>
<soap:body parts="oldPhoto" use="literal"/>
</mime:part>
<mime:part>
<mime:content part="newPhoto" type="image/jpeg"/>
</mime:part>
</mime:multipartRelated>
</wsdl:input>
<wsdl:output>
<mime:multipartRelated>
<mime:part>
<soap:body parts="status" use="literal"/>
</mime:part>
</mime:multipartRelated>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PhotoCatalogService">
<wsdl:port name="PhotoCatalogPort" binding="tns:PhotoCatalogBinding">
<soap:address location="http://localhost:8080/jaxrpc-AttachmentsSample/photocatalog"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
When I used the previous WSDL to generate a service and then a client I got the following error on the client side when trying the "addPhoto" service:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Invalid element in com.examples.PhotoCatalog.types.PhotoInfo - PhotoInfo
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:tislaptop
org.xml.sax.SAXException: Invalid element in com.examples.PhotoCatalog.types.PhotoInfo - PhotoInfo
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:745)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:141)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2754)
at org.apache.axis.client.Call.invoke(Call.java:2737)
at org.apache.axis.client.Call.invoke(Call.java:2413)
at org.apache.axis.client.Call.invoke(Call.java:2336)
at org.apache.axis.client.Call.invoke(Call.java:1793)
at com.examples.PhotoCatalog.PhotoCatalogBindingStub.addPhoto(PhotoCatalogBindingStub.java:190)
at com.examples.PhotoCatalog.PhotoCatalogProxy.addPhoto(PhotoCatalogProxy.java:45)
at com.examples.PhotoCatalog.TestPhotoService.main(TestPhotoService.java:41)
Here is an abridged network trace of the SOAP request sent from client to server...
POST /axis/services/PhotoCatalogPort HTTP/ 1.0
Content-Type: multipart/related;type="text/xml";start="<DBB2B5537065926A4CBC8F8ED8D88F15>";boundary="----=_Part_0_20983130.1113483759295"
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent:Axis/1.2RC3
Host: xxx.xxx.xxx.xxx:8080
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 8466
------=_Part_0_209831301113483759295
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <DBB2B5537065926A4CBC8F8ED8D88F15>
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XML Schema-instance">
<soapenv:Body>
<addPhoto xmlns="">
<ns1:PhotoInfo xmlns:ns1="http://examples.com/PhotoCatalog/types">
<customerName>karl</customerName>
<photoID>100</photoID>
</ns1:PhotoInfo>
<photo href="cid:9AD6390B491EF0EE0B0FCEA7AA945655" xsi:type="ns2:Image" xmlns:ns2="http://xml.apache.org/xml-soap"/>
</addPhoto>
</soapenv:Body>
</soapenv:Envelope>
------=_ Part_0_20983130.1113483759295
Content-Type:image/jpeg
Content -Transfer-Encoding:binary
Content-Id: <F2369DA809C4B1B0ADBA8538372E6F23>
...QE..QE.......
------=_Part_0_20983130.1113483759295
After a little searching I found some info that led me to change the WSDL a little. I redefined the "PhotoInfo" type as follows
<xsd:element name="PhotoInfo">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="customerName" type="xsd:string"/>
<xsd:element name="photoID" type="xsd:int"/>
<xsd:any processContents = "lax"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Now there is no exception thrown, but the PhotoInfo and photo objects are not deserialized. I get null values passed to the PhotoCatalogBindingImpl class.
I noticed that an org.apache.axis.message.MessageElement[] object and associated methods was added to the PhotoInfo class, which I assume is due to adding the <xsd:any processContents = "lax"/> line to the WSDL.
Here is the PhotoInfo and PhotoCatalogBindingImpl class source for reference:
* PhotoCatalogBindingImpl.java
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
package com.examples.PhotoCatalog;
import javax.xml.transform.Source;
public class PhotoCatalogBindingImpl implements com.examples.PhotoCatalog.PhotoCatalog{
public javax.xml.transform.Source
addPhoto(com.examples.PhotoCatalog.types.PhotoInfo oldPhoto, java.awt.Image photo) throws java.rmi.RemoteException {
return null;
public org.apache.axis.types.URI replacePhoto(com.examples.PhotoCatalog.types.PhotoInfo oldPhoto, java.awt.Image newPhoto) throws java.rmi.RemoteException {
return null;
* PhotoInfo.java
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
package com.examples.PhotoCatalog.types;
public class PhotoInfo implements java.io.Serializable, org.apache.axis.encoding.AnyContentType {
private java.lang.String customerName;
private int photoID;
private org.apache.axis.message.MessageElement [] _any;
public PhotoInfo() {
public PhotoInfo(
org.apache.axis.message.MessageElement [] _any,
java.lang.String customerName,
int photoID) {
this.customerName = customerName;
this.photoID = photoID;
this._any = _any;
* Gets the customerName value for this PhotoInfo.
* @return customerName
public java.lang.String getCustomerName() {
return customerName;
* Sets the customerName value for this PhotoInfo.
* @param customerName
public void setCustomerName(java.lang.String customerName) {
this.customerName = customerName;
* Gets the photoID value for this PhotoInfo.
* @return photoID
public int getPhotoID() {
return photoID;
* Sets the photoID value for this PhotoInfo.
* @param photoID
public void setPhotoID(int photoID) {
this.photoID = photoID;
* Gets the _any value for this PhotoInfo.
* @return _any
public org.apache.axis.message.MessageElement [] get_any() {
return _any;
* Sets the _any value for this PhotoInfo.
* @param _any
public void set_any(org.apache.axis.message.MessageElement [] _any) {
this._any = _any;
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof PhotoInfo)) return false;
PhotoInfo other = (PhotoInfo) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.customerName==null && other.getCustomerName()==null) ||
(this.customerName!=null &&
this.customerName.equals(other.getCustomerName()))) &&
this.photoID == other.getPhotoID() &&
((this._any==null && other.get_any()==null) ||
(this._any!=null &&
java.util.Arrays.equals(this._any, other.get_any())));
__equalsCalc = null;
return _equals;
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
__hashCodeCalc = true;
int _hashCode = 1;
if (getCustomerName() != null) {
_hashCode += getCustomerName().hashCode();
_hashCode += getPhotoID();
if (get_any() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(get_any());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(get_any(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
__hashCodeCalc = false;
return _hashCode;
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(PhotoInfo.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://examples.com/PhotoCatalog/types", ">PhotoInfo"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("customerName");
elemField.setXmlName(new javax.xml.namespace.QName("", "customerName"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("photoID");
elemField.setXmlName(new javax.xml.namespace.QName("", "photoID"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
typeDesc.addFieldDesc(elemField);
* Return type metadata object
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
* Get Custom Serializer
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
javaType, xmlType, typeDesc);
* Get Custom Deserializer
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
javaType, xmlType, typeDesc);
I guess my questions are as follows:
1. Why is exception thrown in the first scenario? Is there something wrong with the WSDL? I guess there is, but I can't figure it out.
2. When the change is made to the WDSL(adding <xsd:any processContents = "lax"/>) is there something that I need to add to the PhotoInfo class
to process the org.apache.axis.message.MessageElement[] object. Do I need to "manually" parse that object in the PhotoCatalogBindingImpl class to get
the values of customerName and photoID?
Any other help would be appreciated..
thanks,
Karl Schwarz
System Architect
Northrop Grumman -
Problem calling BPEL process using apache axis client
We have a BPEL process which we are trying to call from apache axis client. The problem is when we execute "call.invoke(new Object[] { xmlStr }) ", it adds an "argo" element to the message, and the xpath is unable to evaluate the message.
We are able to call the process fron .Net and VB 6 using soap toolkit without any problem, so it seems odd we are not able to do so from apache axis.
Here is how it should be received by the BPEL process:
<inputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
<Request xmlns="http://e1.oracle.com/IAM">
<MessageHeader>
<Operation>update</Operation>
</MessageHeader>
<MessageDetail xmlns="">
<szSecondaryUoM_UOM2/>
</MessageDetail>
</Request>
</part>
</inputVariable>
But this is the way it is received having been sent from apache axis (notice the arg0 element) :
<inputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
<arg0 xsi:type="xsd:string" xmlns="http://xmlns.oracle.com/InventoryAdjustment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Request xmlns="http://e1.oracle.com/IAM">
<MessageHeader>
<Operation>update</Operation>
</MessageHeader>
<MessageDetail xmlns="">
<szSecondaryUoM_UOM2/>
</MessageDetail>
</Request>
</arg0>
</part>
</inputVariable>
Any insight as to how to approach this would be appreciated. The WSDL and java code follow.
WSDL:
<?xml version="1.0" encoding="UTF8" ?>
<definitions name="InventoryAdjustment" targetNamespace="http://xmlns.oracle.com/InventoryAdjustment" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/InventoryAdjustment" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://schemas.oracle.com/bpel/extension" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment">
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/InventoryAdjustment" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://schemas.oracle.com/bpel/extension">
<element name="InventoryAdjustmentProcessRequest">
<complexType>
<sequence>
<element name="input" type="string" />
</sequence>
</complexType>
</element>
<element name="InventoryAdjustmentProcessResponse">
<complexType>
<sequence>
<element name="result" type="string" />
</sequence>
</complexType>
</element>
</schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment" xmlns:ns2="http://schemas.oracle.com/bpel/extension">
<xsd:import namespace="http://e1.oracle.com/IAM" schemaLocation="http://tigger:7777/orabpel/xmllib/InventoryAdjustmentRequest.xsd" />
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://e1.oracle.com/IAM" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partnerlink/" xmlns:client="http://xmlns.oracle.com/InventoryAdjustment" xmlns:ns2="http://schemas.oracle.com/bpel/extension">
<xsd:import namespace="http://e1.oracle.com/IAM" schemaLocation="http://tigger:7777/orabpel/xmllib/InventoryAdjustmentResponse.xsd" />
</xsd:schema>
</types>
<message name="InventoryAdjustmentRequestMessage">
<part name="payload" element="ns1:Request" />
</message>
<message name="InventoryAdjustmentResponseMessage">
<part name="payload" element="ns1:Response" />
</message>
<portType name="InventoryAdjustment">
<operation name="process">
<input message="tns:InventoryAdjustmentRequestMessage" />
<output message="tns:InventoryAdjustmentResponseMessage" />
</operation>
</portType>
<binding name="InventoryAdjustmentBinding" type="tns:InventoryAdjustment">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="process">
<soap:operation style="document" soapAction="process" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="InventoryAdjustment">
<port name="InventoryAdjustmentPort" binding="tns:InventoryAdjustmentBinding">
<soap:address location="http://tigger:7777/orabpel/default/InventoryAdjustment/1.0" />
</port>
</service>
<plnk:partnerLinkType name="InventoryAdjustment">
<plnk:role name="InventoryAdjustmentProvider">
<plnk:portType name="tns:InventoryAdjustment" />
</plnk:role>
</plnk:partnerLinkType>
</definitions>
java code:
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceException;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.encoding.XMLType;
import javax.xml.rpc.soap.SOAPFaultException;
import org.apache.axis.client.Call;
public class PostMessageClient {
private static QName SERVICE_NAME;
private static QName PORT_TYPE;
private static QName OPERATION_NAME;
private static String SOAP_ACTION;
private static String STYLE;
private static String THIS_NAMESPACE = "http://xmlns.oracle.com/InventoryAdjustment";
static {
SERVICE_NAME = new QName(THIS_NAMESPACE, "InventoryAdjustment");
PORT_TYPE = new QName(THIS_NAMESPACE, "InventoryAdjustmentPort");
OPERATION_NAME = new QName(THIS_NAMESPACE, "process");
SOAP_ACTION = "process";
STYLE = "message";
public static void main(String[] args) {
try {
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service service = serviceFactory.createService(SERVICE_NAME);
Call call = (Call) service.createCall(PORT_TYPE);
call
.setTargetEndpointAddress("http://tigger:7777/orabpel/default/InventoryAdjustment/1.0");
call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
call.setProperty(Call.SOAPACTION_URI_PROPERTY, SOAP_ACTION);
call.setProperty(Call.OPERATION_STYLE_PROPERTY, STYLE);
call.setOperationName(OPERATION_NAME);
String xmlStr = "<Request xmlns=\"http://e1.oracle.com/IAM\"><MessageHeader><Operation>update</Operation></MessageHeader><MessageDetail xmlns=\"\"><szSecondaryUoM_UOM2/></MessageDetail></Request>";
System.out.println("PostMessageClient - calling");
String ret = (String) call.invoke(new Object[] { xmlStr });
System.out.println("ret = " + ret);
} catch (SOAPFaultException e) {
System.err.println("Generated fault: ");
System.out.println(" Fault Code = " + e.getFaultCode());
System.out.println(" Fault String = " + e.getFaultString());
} catch (JAXRPCException e) {
System.err.println("JAXRPC Exception: " + e.getMessage());
} catch (ServiceException e) {
System.err.println("Service Exception: " + e.getMessage());
} catch (Exception e) {
System.err.println("Service Exception: " + e.getMessage());
}Just a tip: Use a tool as SoapUI to findout the correct SOAP request and related attributes for the SOAP request.
Marc
http://orasoa.blogspot.com -
Axis Type Mapping problem,please help!!!
i want to try out the encoding subsystem of axis,so i write an interface like this:
public interface BookStore {
public Book[] getAllBooks();
}I use the Java2WSDL to generate the wsdl file and WSDL2Java to generate the client/server side bindings ,of course i implemented the BookStoreSOAPBindingImpl class,then use the deploy.wsdd file to deploy the service to axis.the deploy.wsdd is like this:
<!-- Use this file to deploy some handlers/chains and services -->
<!-- Two ways to do this: -->
<!-- java org.apache.axis.client.AdminClient deploy.wsdd -->
<!-- after the axis server is running -->
<!-- or -->
<!-- java org.apache.axis.utils.Admin client|server deploy.wsdd -->
<!-- from the same directory that the Axis engine runs -->
<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from BookStoreService WSDL service -->
<service name="BookStore" provider="java:RPC" style="rpc" use="encoded">
<parameter name="wsdlTargetNamespace" value="urn:bookstore"/>
<parameter name="wsdlServiceElement" value="BookStoreService"/>
<parameter name="wsdlServicePort" value="BookStore"/>
<parameter name="className" value="axis.typemapping.collection.BookStoreSoapBindingSkeleton"/>
<parameter name="wsdlPortType" value="BookStore"/>
<parameter name="typeMappingVersion" value="1.2"/>
<parameter name="allowedMethods" value="*"/>
<typeMapping
xmlns:ns="urn:bookstore"
qname="ns:Book"
type="java:axis.typemapping.collection.Book"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
<typeMapping
xmlns:ns="urn:bookstore"
qname="ns:ArrayOfBook"
type="java:axis.typemapping.collection.Book[]"
serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
</service>
</deployment>
As you could see, the necessary ser/deser factories are declared.
and i checked the http://locahost:8080/axis page and found the service is just right there in the list.
Then i wrote the client like this:
import axis.typemapping.collection.*;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
public class Client
public static void main(String [] args)
try {
String endpointURL ="http://localhost:8080/axis/services/BookStore";
String textToSend;
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
call.setOperationName( new QName("urn:bookstore", "getAllBooks") );
Object[] ret =(Object[])call.invoke( new Object[] { } );
System.out.println("book name:"+(Book)ret[0]);
System.out.println("book name:"+(Book)ret[1]);
} catch (Exception e) {
System.err.println(e.toString());
}But when i execute the client i got the following exception:
org.xml.sax.SAXException: No deserializer defined for array type {urn:bookstore}
BookAs you can see,it is the problem that the Book[] can't be deserialized!
but in the deploy.wsdd the deserializer is declared,so what i have missed?and how to solve this problem please?
best regards:)Some systems are fussy about the method names and some require indexed accessors for array items. I would suggest starting with an implementation like
public class BookStore {
private Book[] books = ...;
public Book[] getBooks() {return books};
public void setBooks(Book[] books) {this.books = books};
public Book getBooks(int j) {return books[j]};
public void setBooks(Book book, int j) {this.books[j] = book};
}-- Frank -
Applet and JavaWebService on Apache-Axis (SOAP)
Hello!
I have build a java-applet - it works fine.
Then I have installed tomcat with axis and I developed a very easy JavaWebService.
For better understanding: I saved the class:
public class test
public double testMethode( String job, double x )
if( "Quadrat".equalsIgnoreCase( job ) )
return x * x;
if( "Sqrt".equalsIgnoreCase( job ) )
return Math.sqrt( x );
return 0.;
}in my apache-tomcat-(with axis)-directory as ../apache-tomcat/webapps/axis/test.jws. I do all the things I describe here on my "localhost".
Then I appended the following code to my applet:
Object webservicereturn=null;
try{
String wsEndpoint = "http://localhost:8080/axis/test.jws";
String wsMethod = "testMethode";
**** Service service = new Service(); *********************************************
Call call = (Call)service.createCall();
call.setTargetEndpointAddress( new URL( wsEndpoint ) );
call.setOperationName( wsMethod );
call.addParameter( "job", Constants.XSD_STRING, ParameterMode.IN );
call.addParameter( "x", Constants.XSD_DOUBLE, ParameterMode.IN );
call.setReturnType( Constants.XSD_DOUBLE );
webservicereturn = call.invoke( new Object[] { "Sqrt", new Double( "12.7" ) } );
catch(Exception ex) {}
JOptionPane.showMessageDialog(webservicereturn.toString() ... );When I start the applet as a java-application the JOptionPane contains the expected value.
THE PROBLEM:
When I start the applet as an applet in my firefox there is no JOptionPane but a beautiful security-exception:
Java Plug-in 1.6.0
Verwendung der JRE-Version 1.6.0 Java HotSpot(TM) Client VM
java.lang.ExceptionInInitializerError
at org.apache.commons.discovery.jdk.JDKHooks.<clinit>(JDKHooks.java:75)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:412)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
*****at LNdW_Applet.init(LNdW_Applet.java:35) *************************************
at sun.applet.AppletPanel.run(AppletPanel.java:417)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:594)
at java.lang.ClassLoader.<init>(ClassLoader.java:225)
at org.apache.commons.discovery.jdk.PsuedoSystemClassLoader.<init>(PsuedoSystemClassLoader.java:73)
at org.apache.commons.discovery.jdk.JDK12Hooks.findSystemClassLoader(JDK12Hooks.java:215)
at org.apache.commons.discovery.jdk.JDK12Hooks.<clinit>(JDK12Hooks.java:73)
... 13 more(The **** are corresponding in this code-block with the **** in the previous code-block.)
I thought that my applet can connect to the same server where it comes from (in this case my localhost).
I am wondering about why the exception is just caused by the instruction "new Service();".
What must I type in my code that also the applet can use the local web-service "test" ???? What is wrong?
Thanks for answering ...
MarkusHello,
it seams to me that it is not possible to solve my problem.
Thats why I mark this threads als solved ...
Markus
Maybe you are looking for
-
Sending Smartform output as a body of the mail not as the attachement
Hi All, my requirement is like this... I need to send a smartform output as the body of a mail. and not as the attachment. Hope you got my question Regards Raghu
-
Output of slideshow to mwv file
i eated a slideshow and wheI did the output it stopped working at 52 percent. I got a pop up stating the file was created successfully when really it didn't. Had no problems creating the slideshow itself. I recently installed the PSE 9 onto my new
-
Oracleasm RPMs not available at OTN for Kernel version 2.6.18-155
Hi, I have installed RHEL5.4, 64-bit. Oracleasm rpms are not present at OTN for kernel version 2.6.18-155.el5 (RHEL 5.4, 64-bit). I am referring to the following link: http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html
-
Firefox crashing and resetting it doesn't work
''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/1035643 /questions/1035643]'' I have reset Firefox however it still continues to crash.
-
Playlist Shuffle as Default Setting
Hi, Anyone know if you can set song shuffle as the default setting for an iPod nano? Every time my iPod is powered off, or synchronizes to my PC, the settings go back to no shuffle and repeat and I have to reset when I power back on. Thanks, Chris