RMI exception calling web service from proxy class
I am getting the following error attempting to call a web service from a proxy. It appears to relate to the type of objects I am trying to send vs the type that is expected. Following the exception I am adding a copy of the control where calling the web service is sucessful, a copy of the proxy class that I am using to make this unsucessful call, and the controller.jpf that has the formBean where I am creating my objects
Caught Exception Calling the Web Service from the Proxy. The Exception is the f
ollowing: java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SO
APException: failed to serialize class org.openuri.www.CreateAccountCheckingReq
uestweblogic.xml.schema.binding.SerializationException: type mapping lookup fail
ure on class=class controls.CheckingService$anyType TypeMapping=TYPEMAPPING SIZE
=5
ENTRY 1:
class: org.openuri.www.CreateAccountCheckingResponse
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
ENTRY 2:
class: org.openuri.www.FundingInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
ENTRY 3:
class: org.openuri.www.AccountInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
ENTRY 4:
class: org.openuri.www.CustomerInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
ENTRY 5:
class: org.openuri.www.CreateAccountCheckingRequest
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
; nested exception is:
javax.xml.soap.SOAPException: failed to serialize class org.openuri.www
.CreateAccountCheckingRequestweblogic.xml.schema.binding.SerializationException:
type mapping lookup failure on class=class controls.CheckingService$anyType Typ
eMapping=TYPEMAPPING SIZE=5
ENTRY 1:
class: org.openuri.www.CreateAccountCheckingResponse
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
ENTRY 2:
class: org.openuri.www.FundingInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
ENTRY 3:
class: org.openuri.www.AccountInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
ENTRY 4:
class: org.openuri.www.CustomerInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
ENTRY 5:
class: org.openuri.www.CreateAccountCheckingRequest
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
Java Control for the web service:
package controls;
import weblogic.webservice.context.WebServiceContext;
* @jc:location http-url="http://localhost:7001/Checking.jws"
* @jc:wsdl file="#CheckingWsdl"
* @jc:handler callback="MessageHandler" operation="MessageHandler"
public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
public static class CustomerInfo
implements java.io.Serializable
public java.lang.String FirstName;
public java.lang.String LastName;
public java.lang.String MiddleName;
public int SSN;
public int CustomerNumber;
public java.util.Calendar CreationDate;
public java.util.Calendar LastModifiedDate;
public static class FundingInfo
implements java.io.Serializable
public float Amount;
public java.util.Calendar CurrentDate;
public int AccountNumber;
public static class anyType
implements java.io.Serializable
public com.bea.xml.XmlObject[] t;
public static class AccountInfo
implements java.io.Serializable
public int AccountNumber;
public float Balance;
public int CustomerNumber;
public java.util.Calendar LastModifiedDate;
public WebServiceContext context = CheckingService.context;
* @jc:protocol form-post="false" form-get="false"
public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
static final long serialVersionUID = 1L;
/** @common:define name="CheckingWsdl" value::
<?xml version="1.0" encoding="utf-8"?>
<!-- @editor-info:link autogen="false" source="" -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
<types>
<s:schema targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="CreateAccountCheckingRequest">
<s:complexType>
<s:sequence>
<s:element name="CustomerInfo">
<s:complexType>
<s:sequence>
<s:element name="FirstName" type="s:string" nillable="false"/>
<s:element name="LastName" type="s:string" nillable="false"/>
<s:element name="MiddleName" type="s:string" nillable="true"/>
<s:element name="SSN" type="s:int"/>
<s:element name="CustomerNumber" type="s:int"/>
<s:element name="CreationDate" type="s:dateTime"/>
<s:element name="LastModifiedDate" type="s:dateTime"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="FundingInfo">
<s:complexType>
<s:sequence>
<s:element name="Amount" type="s:float"/>
<s:element name="CurrentDate" type="s:dateTime"/>
<s:element name="AccountNumber" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CommonHeader" type="s:anyType"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CreateAccountCheckingResponse">
<s:complexType>
<s:sequence>
<s:element name="AccountInfo">
<s:complexType>
<s:sequence>
<s:element name="AccountNumber" type="s:int"/>
<s:element name="Balance" type="s:float"/>
<s:element name="CustomerNumber" type="s:int"/>
<s:element name="LastModifiedDate" type="s:dateTime"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</types>
<message name="CreateAccountCheckingSoapIn">
<part name="parameters" element="s0:CreateAccountCheckingRequest"/>
</message>
<message name="CreateAccountCheckingSoapOut">
<part name="parameters" element="s0:CreateAccountCheckingResponse"/>
</message>
<portType name="CheckingSoap">
<operation name="CreateAccountChecking">
<input message="s0:CreateAccountCheckingSoapIn"/>
<output message="s0:CreateAccountCheckingSoapOut"/>
</operation>
</portType>
<binding name="CheckingSoap" type="s0:CheckingSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="CreateAccountChecking">
<soap:operation soapAction="http://www.openuri.org/CreateAccountChecking" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="Checking">
<port name="CheckingSoap" binding="s0:CheckingSoap">
<soap:address location="http://localhost:7001/Checking.jws"/>
</port>
</service>
</definitions>
FOLLOWING IS THE PROXY CLASS THAT IS UNSUCCESSFUL
import controls.CheckingService.anyType;
import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import org.openuri.CreateAccountCheckingResponseDocument.CreateAccountCheckingResponse;
import org.openuri.www.CustomerInfoAnonType;
import org.openuri.www.FundingInfoAnonType;
import weblogic.jws.proxies.*;
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.WebServiceSession;
import weblogic.webservice.core.handler.WSSEClientHandler;
import weblogic.webservice.tools.pagegen.result;
import weblogic.xml.security.UserInfo;
import weblogic.xml.security.wsse.Security;
import weblogic.xml.security.wsse.SecurityElementFactory;
//import weblogic.jws.proxies.WebServiceB;
//import weblogic.jws.proxies.WebServiceB_Impl;
//import weblogic.jws.proxies.WebServiceBSoap;
public class CheckingWSProxy
public static void CallWS(Controller.CreateAccountCheckingForm form)
String user;
String pass;
try{
* Instantiate the main proxy class. The proxy class has the same name as the
* web service, with "_Impl" appended.
Checking myservice = new Checking_Impl("http://localhost:7001/ConsumerAccountApp/schemas/CheckingService.wsdl");
WebServiceContext context = myservice.context();
WebServiceSession session = context.getSession();
* Registers a handler for the SOAP message traffic.
HandlerRegistry registry = myservice.getHandlerRegistry();
List list = new ArrayList();
list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
registry.setHandlerChain(new QName("Checking"), list);
* Set the username and password token for SOAP message sent from the client, through
* the proxy, to the web service.
user = form.getUsername();
pass = form.getPassword();
UserInfo ui = new UserInfo(user, pass);
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
* Adds the username / password token to the SOAP header.
SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
Security security = factory.createSecurity(null);
security.addToken(ui);
session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
* Get the protocol-specific proxy class.
CheckingSoap msg=myservice.getCheckingSoap();
* Invoke the web service method
msg.createAccountChecking((CustomerInfoAnonType)form.getProxyCustomerInfo(), (FundingInfoAnonType)form.getProxyFundingInfo(), (Object)form.get_CommonHeader());
catch (Exception ex)
System.out.println("Caught Exception Calling the Web Service from the Proxy. The Exception is the following: " + ex.toString());
FOLLOWING IS THE FORMBEAN IN THE CONTROLLER.JPF FILE
* FormData get and set methods may be overwritten by the Form Bean editor.
public static class CreateAccountCheckingForm extends FormData
private anyType _CommonHeader;
private controls.CheckingService.FundingInfo _FundingInfo;
private controls.CheckingService.CustomerInfo _CustomerInfo;
private java.util.Date dOut;
private java.util.Calendar cOut;
private CustomerInfo proxyCustomerInfo;
private FundingInfo proxyFundingInfo;
private String stringDate;
private String currentDate;
private String lastModifiedDate;
private String creationDate;
private String systemMessage;
private String username;
private String password;
private String accountType;
private String trashTransferAccount;
private String trashAccountNumber;
private boolean secureFlag;
public void set_CustomerInfo(controls.CheckingService.CustomerInfo _CustomerInfo)
_CustomerInfo.CreationDate = parseDate(getCreationDate());
_CustomerInfo.LastModifiedDate = parseDate(getLastModifiedDate());
this._CustomerInfo = _CustomerInfo;
public controls.CheckingService.CustomerInfo get_CustomerInfo()
if(this._CustomerInfo == null)
this._CustomerInfo = new controls.CheckingService.CustomerInfo();
_CustomerInfo.CreationDate = dateNow();
_CustomerInfo.LastModifiedDate = dateNow();
return this._CustomerInfo;
public CustomerInfo getProxyCustomerInfo()
this.proxyCustomerInfo = (CustomerInfo)this._CustomerInfo;
return this.proxyCustomerInfo;
public void set_FundingInfo(controls.CheckingService.FundingInfo _FundingInfo)
_FundingInfo.CurrentDate = parseDate(getCurrentDate());
this._FundingInfo = _FundingInfo;
public controls.CheckingService.FundingInfo get_FundingInfo()
if(this._FundingInfo == null)
this._FundingInfo = new controls.CheckingService.FundingInfo();
_FundingInfo.CurrentDate = dateNow();
return this._FundingInfo;
public FundingInfo getProxyFundingInfo()
this.proxyFundingInfo = (FundingInfo)this._FundingInfo;
return this.proxyFundingInfo;
public void set_CommonHeader(anyType _CommonHeader)
this._CommonHeader = _CommonHeader;
public anyType get_CommonHeader()
if(this._CommonHeader == null)
this._CommonHeader = new anyType();
return this._CommonHeader;
public java.util.Calendar dateNow()
this.dOut = new Date();
Calendar cOut = this.cOut.getInstance();
cOut.setTime(this.dOut);
this.cOut = cOut;
return this.cOut;
public java.util.Calendar parseDate( String strDate )
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
Calendar cOut = this.cOut;
df4.setLenient( false );
try
this.dOut = df4.parse( strDate );
} catch ( ParseException e )
cOut.getInstance();
cOut.setTime(dOut);
this.cOut = cOut;
return this.cOut;
public void setStringDate( String stringDate )
this.stringDate = stringDate;
public String getStringDate()
return this.stringDate;
public void setCurrentDate( String currentDate )
this.currentDate = currentDate;
public String getCurrentDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.currentDate = df4.format(_FundingInfo.CurrentDate.getTime());
return this.currentDate;
public void setLastModifiedDate( String lastModifiedDate )
this.lastModifiedDate = lastModifiedDate;
public String getLastModifiedDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.lastModifiedDate = df4.format(_CustomerInfo.LastModifiedDate.getTime());
return this.lastModifiedDate;
public void setCreationDate( String creationDate )
this.creationDate = creationDate;
public String getCreationDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.creationDate = df4.format(_CustomerInfo.CreationDate.getTime());
return this.creationDate;
public void setUsername( String username )
this.username = username;
public String getUsername()
return this.username;
public void setPassword( String password )
this.password = password;
public String getPassword()
return this.password;
public void setAccountType( String accountType )
this.accountType = accountType;
public String getAccountType()
return this.accountType;
public void setTrashTransferAccount( String trashTransferAccount )
this.trashTransferAccount = trashTransferAccount;
public String getTrashTransferAccount()
return this.trashTransferAccount;
public void setTrashAccountNumber( String trashAccountNumber )
this.trashAccountNumber = trashAccountNumber;
public String getTrashAccountNumber()
return this.trashAccountNumber;
public void setSystemMessage( String systemMessage )
this.systemMessage = systemMessage;
public String getSystemMessage()
return this.systemMessage;
public void setSecureFlag( boolean secureFlag )
this.secureFlag = secureFlag;
public boolean getSecureFlag()
return this.secureFlag;
}
This exception means that xml namespaces are different.
Etc. soap has xml element which doesn't belong to namespace of parent xml element and namespace is set without prefix.
I had such problem.
Try to set namespace prefix for this element.
Example:
<el1>
<el2 xmlns="http://..."/>
</el1>
Should be
<el1>
<q:el2 xmlns:q="http://..."/>
</el1>
Similar Messages
-
Calling Web Service from CRM using proxy
Hi all,
I'm facing a problem trying to call a web service from CRM (WAS 620) via XI 3.0. The response that XI recieves from the web service contains SOAP Envelope, and the mapping fails because of it. I built the proxy manually, because if I load WSDL the proxy generation in CRM generates error that sais that external definition coudn't be used.
Is there any way to remove SOAP envelope from the response while mapping?
Is it possible to call web service from WAS 620?
Thanks!!!!
Anya.Hi Manish,
SOAP adapter does pass the message to XI (this message contains SOAP envelope although XI expects to get message without it), and during the mapping step i get "Runtime Exception in Message-Mapping transformatio~".
I suppose it's because i created proxy manually. I did so because when i imported WSDL, and tried to generate proxy in CRM, i got an error message that said that proxy couldn't be generated because external definitions are only allowed in XI 3. But my XI version is 3.0! And when I generate the same proxy in my R/3 system that is installed on WAS 640, it works.
What can I do?
Cheers,
Anya. -
Error while deploying web service from Java class
Hi,
I have a simple java class which I want to deploy as web service with some methods in the Java class as web service operations.
How to do this in Jdev 11g?
Is there any good detailed tutorial on this?
I just created an web service from the class and went for deployment in Weblogic.
This resulted in Illegal Annotation Exception as shown below.
Please help!!
Regards,
Sam
[Deployer:149034]An exception occurred for task [Deployer:149026]deploy application WorklistWebService-CustomWorklist-context-root on SOA_Cluster.: [HTTP:101216]Servlet: "CustomWorkListUtilSoap12HttpPort" failed to preload on startup in Web application: "WorklistWebService-CustomWorklist-context-root.war".
javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:135)
at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:55)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:485)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
at com.gehc.util.jaxws.WorkflowExceptionBean
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:95)
... 51 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
at com.gehc.util.jaxws.WorkflowExceptionBean
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:478)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:308)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1149)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:169)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:160)
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:74)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
... 53 more
:com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:1 counts of IllegalAnnotationExceptions.
[08:44:23 PM] Weblogic Server Exception: weblogic.application.ModuleException: [HTTP:101216]Servlet: "CustomWorkListUtilSoap12HttpPort" failed to preload on startup in Web application: "WorklistWebService-CustomWorklist-context-root.war".
javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:135)
at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:55)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:485)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
at com.gehc.util.jaxws.WorkflowExceptionBean
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:95)
... 51 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
at com.gehc.util.jaxws.WorkflowExceptionBean
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:478)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:308)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1149)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:169)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:160)
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:74)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
... 53 more
:com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:1 counts of IllegalAnnotationExceptions
[08:44:23 PM] Caused by: java.lang.Throwable: Substituted for the exception java.security.PrivilegedActionException which lacks a String contructor, original message - com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
[08:44:23 PM] See server logs or server console for more details.
[08:44:23 PM] weblogic.application.ModuleException: [HTTP:101216]Servlet: "CustomWorkListUtilSoap12HttpPort" failed to preload on startup in Web application: "WorklistWebService-CustomWorklist-context-root.war".
javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:135)
at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:55)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:485)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
at com.gehc.util.jaxws.WorkflowExceptionBean
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:95)
... 51 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
this problem is related to the following location:
at java.lang.StackTraceElement
at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
at java.lang.Throwable
at public java.lang.Throwable com.gehc.util.jaxws.WorkflowExceptionBean.rootCause
at com.gehc.util.jaxws.WorkflowExceptionBean
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:478)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:308)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1149)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:169)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:160)
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:74)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
... 53 more
:com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:1 counts of IllegalAnnotationExceptions
[08:44:23 PM] #### Deployment incomplete. ####
[08:44:23 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)javax.xml.ws.WebServiceException: Unable to create JAXBContext
Webservice: Unable to create JAXBContext
javax.xml.ws.WebServiceException: Unable to create JAXBContext
http://naive-amseth.blogspot.ca/2010/06/error-unable-to-create-jaxbcontext.html -
Is there a way to call web service from 2 servers??
Hi,
I need to know if its possible to call web service from 2 different servers without having load balancer??? I mean, if one of the server has heavy work on, then it should call web service from the other server.
Thanks in advance.
Best Regards.Hi,
WebLogic Cluster has this feature ( Load Balancing & Failover ). If you will deploy your WebService to a WebLogic Cluster and then If you will put a Proxy in front of it like (Apache)...Then it is Possible.
<h3><font color=maroon>What All You Need To Do ? ...... as following</font></h3>
<b><font color=maroon>Step1).</font></b> Create a WebLogic Cluster (minimum two ManagedServers)
http://weblogic-wonders.com/weblogic/2010/04/28/weblogic-clustering-in-remote-boxes/
<b><font color=maroon>Step2).</font></b> Install a Proxy like Apache in frot of them like following:
http://weblogic-wonders.com/weblogic/2010/05/13/apache-proxy-as-static-content-repository/
Or
http://weblogic-wonders.com/weblogic/2010/08/01/weblogic-httpclusterservlet-proxyserver/
<b><font color=maroon>Step3).</font></b> Now Configure a FrontEnd Host for your Cluster by providing the ProxyServer Host name as the FrontEnd of your Cluster. This step is required to Generate the Dynamic WSDL with the Address of the Frontend.(Not of a perticular WebLogic Server)
http://weblogic-wonders.com/weblogic/2010/06/21/configuring-frontend-host-and-port/
<b><font color=maroon>Step4).</font></b> Deploy your WebService on the Cluster
<b><font color=maroon>Step5).</font></b> Now Hit the WebService using the Proxy URL:
Example:
http://ProxyHostname:proxyPort/ServiceContextRoot/ServiceURI?WSDL
Thanks
Jay SenSharma -
Dear All,
How can we call web service from SAP?
Thanks in Advance,
RamanaHI kcr,
pls see this link
http://****************/Tutorials/Others/ValidateEmailID/Webservice.htm
write this program
REPORT zvalidate_email.PARAMETERS: p_mail(100) LOWER CASE. " E-Mail id to be verifiedDATA: http_client TYPE REF TO if_http_client .DATA: w_string TYPE string ,
w_result TYPE string ,
r_str TYPE string .DATA: result_tab TYPE TABLE OF string.START-OF-SELECTION .
CLEAR w_string .
CONCATENATE
'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email=' p_mail
INTO
w_string . CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = w_string
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4. CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2. CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
CLEAR w_result .
w_result = http_client->response->get_cdata( ). REFRESH result_tab .
SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab . READ TABLE result_tab INTO r_str INDEX 2.
IF r_str+44(1) = 't'.
WRITE:/ 'Valid email address'.
ELSE.
WRITE:/ 'Invalid email address'.
ENDIF.Output:
thanks
karthik -
Calling web service from MBean weblogic cannot find type mapping file
When calling web service from custom MBean i get java.io.IOException.
java.io.IOException: unable to find the type mapping resource file for:
net.msl.sfx.ebooking.client.BookingPartiesServiceService
at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegis
try.java:67)
at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:83)
at net.msl.sfx.ebooking.client.BookingPartiesServiceService_Impl.<init>(
BookingPartiesServiceService_Impl.java:22)
at net.msl.sfx.ebooking.service.EBookingService.getBookingParties(EBooki
ngService.java:59)
The types.xml file is placed in same jar file as the classes such as net.msl.sfx.ebooking.client.BookingPartiesServiceService_Impl.
When calling the same class/method from a EJB, everything works fine and the web service is called.i am having the same problem.
Do you have a solution now?
Thanks -
Web Service From Java class, serialization problem
Hi,
I want to create Web Service from Java class, I made java project, generated web service from it, create web service archive project and deployed it to WAS 6.40.
My class have 2 methods,
public int add(int a, int b);
public MyResponse doSomthing(MyRequest req);
I can succesfully call add method from Web Service Navigator, it works fine but when I call doSomthing methods I get the following error:
<b>
Deserializing fails. Nested message: XML Deserialization Error. Result class [com.mycomp.sap_tech.ws.MyRequest] does not have property [Amount] of type [java.lang.String]. It is required to load XML..
</b>
Any ideas how to resolve it?
P.S. MyRequest class is exposed throw VI, has default constractor and public getters and setters for all properties. It implements Serializable as well. Any guesses?
Thanks in advance,
Victor.Hi Bhavik, thanks for response.
as I already mentioned it implements Serializable, so it is not the problem.
Thanks Avi but it didn't helps iether
Victor -
Is it possible to call web service from ABAP SAP 4.6 c..If yes how
Hi Friends,
Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
Thanks in Advance.
Murali Krishna K
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PMOlivier CHRETIEN wrote:>
> Hi Terry,
>
> So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
>
> How much abap code lines do you have for a web service call ?
> Do you have to code the call specifically for each different web service ?
> Are you able to use the WSDL ?
>
> Nice job if you have coded your own private SOAP runtime !
>
> But I don't think this is an easy solution for everybody...
>
> Regards,
>
> Olivier
Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication. So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic. Here's some sample code:
DEST = 'SAPHTTPA'.
TRANSLATE HOST TO LOWER CASE.
MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
CONCATENATE HOST MYURL INTO MYURL.
REQUEST_HEADERS-DATA =
'Content-type: application/x-www-form-urlencoded'.
APPEND REQUEST_HEADERS.
CLEAR REQUEST_HEADERS.
*........Convert Order Number to External Format........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ORDER
IMPORTING
OUTPUT = ORDER.
*........Convert Item Number to External Format.........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITEM
IMPORTING
OUTPUT = ITEM.
*........Convert Material Number to External Format.....................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = MATERIAL
IMPORTING
OUTPUT = MATERIAL.
CONCATENATE 'sOrder=' ORDER
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sItem=' ITEM
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sMaterial=' MATERIAL
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CALL FUNCTION 'HTTP_POST'
EXPORTING
ABSOLUTE_URI = MYURL
RFC_DESTINATION = DEST
BLANKSTOCRLF = 'X'
TABLES
RESPONSE_ENTITY_BODY = RESPONSE_BODY
REQUEST_ENTITY_BODY = REQUEST_BODY
RESPONSE_HEADERS = RESPONSE_HEADERS
REQUEST_HEADERS = REQUEST_HEADERS
EXCEPTIONS
CONNECT_FAILED = 1
TIMEOUT = 2
INTERNAL_ERROR = 3
TCPIP_ERROR = 4
DATA_ERROR = 5
SYSTEM_FAILURE = 6
COMMUNICATION_FAILURE = 7
OTHERS = 8.
CHECK SY-SUBRC = 0. "more appropriate msg goes here
LOOP AT RESPONSE_BODY.
IF RESPONSE_BODY+0(7) <> '<string' AND
RESPONSE_BODY+0(8) <> '</string' AND
RESPONSE_BODY+0(5) <> '<?xml'.
SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
TRANSLATE FIELD_NAME TO UPPER CASE.
CASE FIELD_NAME.
WHEN 'HEIGHT'.
HEIGHT = FIELD_VALUE.
WHEN 'WIDTH'.
WIDTH = FIELD_VALUE.
WHEN 'LENGTH'.
LENGTH = FIELD_VALUE.
WHEN 'WEIGHT'.
WEIGHT = FIELD_VALUE.
WHEN 'QTY'.
QTY = FIELD_VALUE.
ENDCASE.
ENDIF.
ENDLOOP.
Hope this helps...
Terry
Edited by: Terry West on Feb 4, 2008 3:08 PM -
How do i call web services from SAP ABAP
Hello,
Ian working with .net team. they are using sap .net Connector to connect SAP. But my job is In SAP side when Purchase Requisition is created, I have to call web services from ABAP and i have to pass the Purchase Requisition number to web service(.net Program). Please help me how to call web services from ABAP and how to pass value. Any one help me with example.
Thanks
RaviKumarHi Ravi,
If you can call EJB from ABAP and from EJB call Web service which you want to call. I am giving code to write in EJB business method processFunction.
public void processFunction(Function function) {
IRepository repository;
repository = new Repository("TestRepository");
JCO.MetaData fmeta = new JCO.MetaData("ZTEST_EJB");
fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255, 0, 0,
JCO.IMPORT_PARAMETER, null);
fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255, 0, 0,
JCO.EXPORT_PARAMETER, null);
fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255, 0, 0,
JCO.EXPORT_PARAMETER, null);
repository.addFunctionInterfaceToCache(fmeta);
JCO.ParameterList input =
function.getImportParameterList();
JCO.ParameterList output =
function.getExportParameterList();
JCO.ParameterList tables =
function.getTableParameterList();
if (function.getName().equals("ZTEST_EJB")) {
output.setValue(input.getCharArray("REQUTEXT"),"ECHOTEXT");
output.setValue("This is a response " + table.getString("E_NAME") +" " + output.getName(1), "RESPTEXT");
else if (function.getName().equals("STFC_STRUCTURE")) {
JCO.Structure sin = input.getStructure("IMPORTSTRUCT");
JCO.Structure sout = (JCO.Structure)sin.clone();
try {
System.out.println(sin);
catch (Exception ex) {
System.out.println(ex);
output.setValue(sout,"ECHOSTRUCT");
output.setValue("This is a response from Example5.java","RESPTEXT");
}//if
Here REQUTEXT, ECHOTEXT are import parameter and RESPTEXT is the Export parameter of Function module ZTEST_EJB in SAP.
Here from this bisuness method you can call web service which you want and give back the result of webservice to ABAP F.M.
Regards,
Bhavik -
How to call web services from PL/SQL?
Hi,
Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc....
Thanks in advanceHere's some example skeleton code to get you started...
PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
soap_request VARCHAR2(30000);
soap_respond CLOB;
http_req utl_http.req;
http_resp utl_http.resp;
resp XMLType;
soap_err exception;
v_code VARCHAR2(200);
v_msg VARCHAR2(1800);
v_len number;
v_txt Varchar2(32767);
BEGIN
UTL_HTTP.SET_PROXY(p_proxy);
-- Define the SOAP request according the the definition of the web service being called
soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'||
' <SOAP-ENV:Body>'||
' <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
' <m:UserName>'||p_username||'</m:UserName>'||
' <m:Password>'||p_password||'</m:Password>'||
' </m:DownloadRequest>'||
' </SOAP-ENV:Body>'||
'</SOAP-ENV:Envelope>';
http_req:= utl_http.begin_request
( 'http://www.website.net/webservices/GetDetailsService.asmx'
, 'POST'
, 'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml');
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
utl_http.write_text(http_req, soap_request);
http_resp:= utl_http.get_response(http_req);
utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
LOOP
utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
soap_respond := soap_respond || v_txt; -- build up CLOB
END LOOP;
utl_http.end_response(http_resp);
resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
END;Using secure web services (https)...
Web serivces call in Plsql
As for 'pros and cons'... there's nothing to compare against... either you want to call a web service or you don't. -
Parse errors while creating a Web service from Java class!
Can anybody tell me please, is it possible to create a Web Service from java class where the input from user is required ?
I have the following program, which is successfully compiled, but when I'm trying to make a web service in JDeveloper, the following error occurs:
"Validation failed.
The implementation class primePackage.isPrime ofport type MyWebService contains parse errors."
import java.io.*;
import java.util.*;
class isPrime
public static void main (String args[])
Scanner reader = new Scanner(System.in);
int n;
System.out.println ("Enter a number you want to know is it prime or not");
n=reader.nextInt();
if (isPrime(n))
System.out.println ("True");
else
System.out.println ("False");
static boolean isPrime (int n)
int i=2;
while (i<=n-1)
if (n%i==0)
return false;
i++;
return true;
}Hi,
Can anybody tell me please, is it possible to create
a Web Service from java class where the input from
user is required ?Yes, the parameters of your method will be mapped in WSDL.
But i've some considerations about your code.
I suggest you change the name of isPrime do Prime, its a good code convention to put the name of class starting with Upper case. and isn't good the name of class equals to name of method.
I suggest you to change the "static boolean isPrime (int n)" to "public boolean isPrime(int n)" to publish a method as a WebService method it's must be public and not static. After this change try to generate your Web Service.
Regards. -
Calling Web service From R/3
Hi ,
we have a requirement, where we have to call a web service in Biz talk from SAP and compile the received data in R/3 as a report.
has any one worked on such a requirement, could you please provide your inputs on the same.
Thanks,
Raghavendra[Calling Web service From R/3|http://forums.sdn.sap.com/search.jspa?threadID=&q=CallingWebserviceFromR/3&objID=f50&dateRange=all&numResults=15]
-
Calling web service from Obiee
Hi,
I want to get data from webservice and show the results in a dashboard.
I checked http://www.artofbi.com/index.php/2009/08/consuming-a-web-service-in-obiee-presentation-services-using-jquery-cdn/ web site.
But the author is retrieving data from a web page by sending parameter to querystring like
yqlq=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22YHOO%22%2C%22AAPL%22%2C%22GOOG%22%2C%22MSFT%22%2C%20%22PTRY%22)&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env&callback=?";
But as I know we can not call web services with parameters like this.
How can I call web service from BI?
Could you please suggest articles or sample codes, documents etc.
Regards,
byeHi,
I controlled this document. The document is explaining Oracle BI web services for extracting information from Oracle BI and showing them in other environments. But I want to get results from a web service ( for example a web service which returns currency rates, weather information or sharepoint lists) and then represent them in Oracle BI Dashboards. -
Calling web Service from the Custom Adapter.Is it Possible?
Hi Experts,
I am having requirment in which i have to cal com.sap.aii.mapping.lookup.LookupService for calling web Service from the Custom Adapter.Is it Possible?
Regards,
Rajesh.DHi Rajesh..
Just looking the problem in another angle.. if there is no constraint that you have to use XI specific API to call the web service, why dont you use usual Java API used for calling a web service inside you custom adapter (I have Microsoft background.. donno exactly how it is done in Java,, but in .NET kind of a language it is possible). SInce your adapter is in Java itself and is capable of calling web service.. collect or lookup the data whatever you want and validate...
Just a thought..
VJ -
Calling web service from oracle application framework r12
Hi Techies
Is anybody know How to call web service from oracle application framework r12(step by step procedure),because i searched in net but i could not understand that one
Thanks
Dillibabu B
Edited by: 962005 on 28 Sep, 2012 12:11 AMHi,
Check below links:
http://oracle.anilpassi.com/oa-framework-with-captcha-webservice.html
http://oracle.anilpassi.com/integrate-oa-framework-with-web-service.html
https://blogs.oracle.com/ebusinesssuiteintegration/entry/r121_-invokingweb_service_fr
--Sushant
Maybe you are looking for
-
Problem with App update after upgrade to ios7
Hi I have just upgraded to ipads (ipad2 + ipad mini) to ios7. One thing I have noticed on both. I updated apps in the app store, now the apps that updated are sitting on the screen, they have been updated, and can be opened. However in the past once
-
HTTPService and requestTimeout connection issue.
I could really use some help with using the requestTimeout with HTTPService. I have successfully coded the timeout to 10 seconds and tested it with a long running http request. After 10 seconds the fault listener does execute properly. The trouble I
-
EthernetIP, Unable to connect to the network path specified, Multiple NICs
I have not been able to find an answer concerning this error, so I am hoping someone can help. Computer has LabVIEW 2013 with the NI-Industrial Communications for EtherNet/IP 1.2.1 addon with Win XP although I have verified the same setup with Win 7
-
Having problem with big pond email account downloading on all devices
Hi, Have just bought the Mac Air and am having enormous problems with emails downloading on all devices (ipad, iphone and Mac). If it downloads on one it does not download on another. I have a Telstra bigpond.net.au account. I do not want to change n
-
Hi, I would want to insert a gif file in body message. it is possible?as I can make? as I can make thanks to All. Simon P.S. it is a lot urgent!!!