How to Migrate OC4J EJB Web service to Weblogic
Hello,
We have a J2EE app developed under OC4J that needs to be migrated to weblogic 10.x. It uses web services mapped to EJB's with the oracle.j2ee.ws.SessionBeanWebService class, example setup:
<servlet>
<servlet-name>CreditCardManager</servlet-name>
<servlet-class>oracle.j2ee.ws.SessionBeanWebService</servlet-class>
<init-param>
<param-name>jndi-name</param-name>
<param-value>CreditCardManagerBean</param-value>
</init-param>
</servlet>
Can someone point me to any docs on how to create the equivalent objects in Weblogic?
Thanks,
Leor
Microsoft webservices uses HTTP sessions to maintain state. That means that the webservice sends a token to the client to be passed back on subsequent calls.
Unfortunately, the webservice control in 8.1 doesn't know how to send the session token back to the MS webservice. The webservice control knows how to talk SOAP only. It doesn't know about session tokens. The reason for this is the different protocols available to transmit SOAP. Most of them are not HTTP session aware.
Workshop webservices uses conversation ID's that are contained within the SOAP header to maintain state. That way, we don't have the dependency on the session state for maintaining state.
The way to handle Microsoft's stateful webservice implementation is to create a custom webservice control that uses an HTTP client. Query the HTTP client for the session cookie. Store the session token and send it with subsequent calls to the MS webservice.
Thanks,
David Gorton
Workshop Customer Centric Engineering
Similar Messages
-
How to create secure EJB web service in Oc4J using JDeveloper?
We are going to develop a EJB web service running in OC4J using JDeveloper 10.1.3.3.
By using the JDeveloper feature, we can simply create the web service by using the "Web Service Endpoint Interface" in the session bean.
However, unlike the web service created from Java class, I can't find any option to change the security setting of this web service. We tried adding annotation like @DenyAll for testing, but there has no effect and related method can still be called without WS-Security header.
Now, we can only change the security setting via the web console after deployment (select the web service, then enable security in administration page, and then edit security configuration to change the inbound policies for authentication). It works in our local machine, but it may not work in the production environment as we cannot touch the em console.
May I know if there has any way to include the security setting inside the project?
Thanks in advance.If I am not wrong, you might be probably talking about this :
http://docs.oracle.com/cd/B40099_02/books/EAI2/EAI2_WebServices33.html#wp179056
In order to implement the SOAP header, you would have to :
(1) Define SOAP header in the wsdl of the service.
(2) Add a new soap binding in the wsdl, which contains soap header and soap body.
I think, this should get you going.. -
How to add image in ejb web service
Hello Community,
I am writing web service to create a PDF file using itext API. In PDF file i want to add an image.
Can someone please tell that , how can i add image(jpeg, png , etc.) to an ejb web service?
Thanks in advance
Regards,
Dishant ChawlaHi,
Please check the below code which i used to add image to the header using iText . Similarly you can add image directly to the document also as a element.
Adding image as Header:
httpServletRequest = request.getServletRequest();
domainURL=httpServletRequest.getScheme()+"://"+httpServletRequest.getServerName();
imgLogo=domainURL+request.getWebResourcePath()+"/images/XXXX.jpg";
image =Image.getInstance(imgLogo);
image.scalePercent(22);// As per you need
chunk = new Chunk(image, 0, -20);
HeaderFooter header_pdf = new HeaderFooter(new Phrase(chunk), false); // here i have added image as header
header_pdf.disableBorderSide(0);
header_pdf.setAlignment(Element.ALIGN_CENTER);
header_pdf.setBorder(0);
document.setHeader(header_pdf);
(or)
Adding Image a Element:
httpServletRequest = request.getServletRequest();
domainURL=httpServletRequest.getScheme()+"://"+httpServletRequest.getServerName();
imgLogo=domainURL+request.getWebResourcePath()+"/images/XXXX.jpg";
image =Image.getInstance(imgLogo);
image.scalePercent(22);
document.add(image);
Java IText: Image | tutorials.jenkov.com
Regards,
Srinivasan V -
EJB Web Service Interface parameters name changed
Hi, all,
I create a simple Session EJB 3.0 with Web Service interface in Jdeveloper 10.1.3.4. and I deployed it into the embedded OC4J server.
The question is I found that the web service operator parameters is changed to "String_1" (actually the parameter in EJB method is String ss). And I found the WSDL file is also String_1.
How to create the real parameter name in WSDL from EJB Web Service interface? Any help on that?
Best Regards,
Billif you do a lookup for the name "java:comp/env/ejb/queryProc" in the servlet, the deployment descriptor of your web-archive must contain an ejb-reference with the ref-name 'ejb/queryProc'.
-
I have been programming an EJB Web Service. I programmed the EJB and I have programmed the Client. It works properly when I execute it in the command line.
However, I would like to access it using a web page. I have tried with a JSP (I posted some messages in the forum before) but I had lots of problems because of the versions. I have tried with a servlet but it doesn't work (I don't know really how to execute it, where to deploy it, what is the address to write in the iExplorer, and so on).
Please, if somebody can help me I will be very thankful.
I am new in developing with J2EE and OC4J and I am desperate!
I need documentation or a complete example for OC4J 9.0.3.
Thank you very much!
PalomaI have been programming an EJB Web Service. I programmed the EJB and I have programmed the Client. It works properly when I execute it in the command line.
However, I would like to access it using a web page. I have tried with a JSP (I posted some messages in the forum before) but I had lots of problems because of the versions. I have tried with a servlet but it doesn't work (I don't know really how to execute it, where to deploy it, what is the address to write in the iExplorer, and so on).
Please, if somebody can help me I will be very thankful.
I am new in developing with J2EE and OC4J and I am desperate!
I need documentation or a complete example for OC4J 9.0.3.
Thank you very much!
Paloma -
JAX-RPC vs OC4J J2Ee web service
Hi,
Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
1. Is this a known issue in JAX-RPC platform?
2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
3. When is the final release of 10.0.3 expected?
4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
Thanks and regards
__HariHi,
Currently we use Oracle10G 10.0.3 developer preview edition. we deployed same web service on both JAX-RPC platfrom and OC4J J2EE web service platfrom (RPC encoding style). We found that old platform seems to perform better than JAx-RPC platfrom with regard to serialization and de-serialzation. We also did the test on Doc/literal style in JAX-RPC platfrom and its performance is not as good as the one deployed on old platform. We understand JAX-RPC is new implementation and Oracle10.0.3 is under developer preview edition and so it may not be optimized. We have following questions
1. Is this a known issue in JAX-RPC platform?
2. Is there anyway to optimize JAX-RPC web service? Like using different XMl parser (instead of Oracle XML parser)
3. When is the final release of 10.0.3 expected?
4. Will Oracle be supporting old web service platfrom (OC4J J2EE web service platform)? If so how long?
Thanks and regards
__Hari -
How can I create a web Service from my Web Dynpro Application ?
Hi,
Kindly let me know How I could create a "Web Service" with my Web Dynpro DC project.
Awaiting your responses.
Regards,
MaheshHi Mahesh,
You can use the web services by creating the Model in web Dynpro
And if you want to publish your own web service then you have to create a EJB module and publish as a web service.
Thanks
Ninad -
How to use WS-RM web Service from Session Bean?
Hi all.
Could you tell me the way how to call WS-RM web service(Staring BPM Process) from SessionBean?
Our environment: SAP NetWeaver CE 7.2 SP3
I do the following.
I have created a BPM Process starting with Message Start Event.
This Message Start Event was created by Service Interface(stateless and asynchronous) which was imported from ESR.
I deployed this into my server and it worked fine in webservice navigator as a WS-RM WebService.
But I can't call this webservice from SessionBean in EJBExplorer.
I get the following error message:
Caused by: This exception is wrapper of javax.xml.ws.soap.SOAPFaultException. com.sap.engine.services.webservices.espba
se.client.bindings.exceptions.SOAPFaultException: Invalid WS-RM message. There are no WS-RM headers within SOAP message.
at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.processFault(JAXWSUtil.java:412)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1366)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:960)
at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:915)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
at $Proxy2753.zwsvCheckOrderdataMainprocessStart(Unknown Source)
at jp.co.ogis_ri.WSTestSessionBean.exeWS(WSTestSessionBean.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I created this SessionBean as follows:
I created DCs for EJB and created SessionBean in EJB DC.
I imported a WSDL file(WS-RM web service) from Service Registory and
I created service clients and Service References.
After that I implemented SessionBean to call web service checking with this help.
http://help.sap.com/saphelp_nwce72/helpdata/en/44/4d2bb1c6b00597e10000000a155369/frameset.htm
After deploying this EJB,I configured properties in nwa.
Thanks
YuichiYuichi
Did you manage to solve this? I'm doing something similar and seeing the same problem, although they're up to 7.3 SP7.
Any help greatly appreciated.
Lewis -
How do we deploy several Web Services under the same Root Context?
We have several webservices, each in their own WAR file, running on OC4J 10.1.3. They each have their own Root Context and Oracle Welcome Servlet. This works well, and since they are all separate we can easily hot-deploy updated versions.
The drawback is separate URL's like :
.../RootContext1/WebService1
.../RootContext2/WebService2
.../RootContext3/WebService3
How do we assemble our Web Services to share a single Root Context? We are hoping to achieve URL's like this :
.../WebServices/WebService1
.../WebServices/WebService2
.../WebServices/WebService3
Do we have to bundle them all into the same WAR/EAR (and loose the power of individual deployment) or is there another way?
Thanks in advance!If each one is a separate WAR file, then at the OC4J level each one will need a separate root context as it gets bound into the default-web-app.
I guess the corollary question here is if there is someway to combine multiple webservice endpoints into one WAR file -- which can then be mapped to a single root context.
I'll try and get someone more WS savvy than myself to take a look at this for you.
And Clever Apache is a viable option.
cheers
-steve- -
Consuming EJB Web Service in WD ABAP component
Hi,
I have a scenario where I have Portal KM access methods exposed as EJB Web Service. This web service is deployed on J2EE engine.
And I have to consume this web service from my WD ABAP component controller.
Any idea how this can be achieved?
Thanks and regards,
AmeyThis doesn't really have anything to do with Web Dynpro. Normal ABAP functionality is used for the consumption of a web service. In ABAP we create a proxy class based off the WSDL of the web service. This proxy class can then be called from within Web Dynpro like any other ABAP class. You can read about consuming a web service in the online help:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9e/c7a3591dc74a679bbc9716354e42af/frameset.htm -
Deployment of JSR-109 Web Services on Weblogic 11g (OAS migration)
Hi.
I'm being part of an ongoing migration effort from Oracle Application Server 10.1.3.5 to WebLogic 11g (10.3.6). Some of the OAS applications use old JSR-109 Web Services, where each service has the following components:
- A SEI interface that extends java.rmi.Remote and declares the service methods, which throw java.rmi.RemoteException (e.g. ServiceSEI)
- A service implementation POJO that implements the SEI interface (e.g. ServiceImpl)
- A [Service]-config.xml file that declares the service and relates name, namespaces, packages, interface and implementation (e.g. Service-config.xml)
- A declaration of the service implementation POJO as a servlet (with mapping) in web.xml (docs says it doesn't have to be technically a servlet)
- A webservices.xml file that defines the service and references the mapping file.
- A [Service]-mapping.xml file that defines the WS-Java mappings.
All the artifacts look right according the old documentation:
- Programming Web Services for WebLogic Server, Creating a J2EE Web Service Manually: http://otndnld.oracle.co.jp/document/products/wls/docs92/webserv/jsr109.html
- Web Services for J2EE 1.0 Final Release Spec: http://download.oracle.com/otndocs/jcp/websvcs-1.0-fr-spec-oth-JSpec/
The Web Services work OK in OAS. When I try to deploy any of the application that contain one of that services to WebLogic, I get the following Exception:
<BEA-101216> <Servlet: "WSServlet_Procesos" failed to preload on startup in Web application: "/webapp".
java.lang.IllegalStateException: ClassNotFound co.com.acme.services.ServiceSEI_serviceOperation_RequestStruct
at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.processTypeMappings(Deploytime109MappingHelper.java:601)
at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.initBindingFileFrom109dd(Deploytime109MappingHelper.java:273)
at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.<init>(Deploytime109MappingHelper.java:171)
at weblogic.wsee.bind.runtime.internal.RuntimeBindingsBuilderImpl.createRuntimeBindings(RuntimeBindingsBuilderImpl.java:86)
at weblogic.wsee.ws.WsBuilder.createRuntimeBindingProvider(WsBuilder.java:705)
at weblogic.wsee.ws.WsBuilder.buildService(WsBuilder.java:201)
at weblogic.wsee.ws.WsFactory.createServerService(WsFactory.java:54)
at weblogic.wsee.deploy.ServletDeployInfo.createWsService(ServletDeployInfo.java:91)
at weblogic.wsee.deploy.DeployInfo.createWsPort(DeployInfo.java:372)
at weblogic.wsee.server.servlet.BaseWSServlet.init(BaseWSServlet.java:83)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
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:1981)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1955)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1874)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
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:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
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:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
I obviously though the EAR package given to me was incomplete, lacking the ClassNotFound related class, but the package was OK, and is exactly the same that deploys without problems in OAS.
The ClassNotFound related class is referenced in the <java-xml-type-mapping> element of the [Service]-mapping.xml file, e.g.:
<java-xml-type-mapping>
<java-type>co.com.acme.services.ServiceSEI_serviceOperation_ResponseStruct</java-type>
<root-type-qname xmlns:typeNS="urn:Service/types">typeNS:serviceOperationResponse</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>result</java-variable-name>
<xml-element-name>result</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
I searched the OAs installation deployment dirs looking for the missing class and found it was present in a Jar called deployment-cache.jar. According OC4J related documentation, this Jar es auto-generated at deployment time.
Weblogic 11g documentation says that kind of Web Services will continue to run, without any changes, on version 10.3.x of WebLogic Server because the associated Web services run time is still supported in this release, although it is deprecated and will be removed from the product in future releases (http://docs.oracle.com/cd/E21764_01/web.1111/e13760/upgrade.htm). I know the right estrategy is migrate the Web Services, but right now my client needs to deploy and use them as they are. I think WL recognizes my service since internally is calling a "Deploytime109MappingHelper" class.
¿Is there any way I can deploy that kind of services to Weblogic 11g? ¿I'm I missing some required step?
As a workaround, I included the OAS generated deployment-cache.jar into the EAR to deploy in Weblogic 11g and the app deploys without errors, but I see this is not a nice solution.
Any help would be much appreciated.
Thanks,
Esteban
Edited by: salzo on Oct 30, 2012 9:54 AM
Edited by: salzo on Oct 30, 2012 9:56 AMHi. The [Service]-mapping.xml file is a standard "JAX-RPC mapping file" according the JSR-109 spec and WebLogic 9.2 doc ([1],[2]). That's the file that references the class. Here's a fragment:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
<package-mapping>
<package-type>co.com.acme.services</package-type>
<namespaceURI>urn:Service/types</namespaceURI>
</package-mapping>
<package-mapping>
<package-type>co.com.acme.services</package-type>
<namespaceURI>urn:Services/wsdl</namespaceURI>
</package-mapping>
<java-xml-type-mapping>
<java-type>co.com.acme.services.ServiceSEI_serviceOperation_RequestStruct</java-type>
<root-type-qname xmlns:typeNS="urn:Service/types">typeNS:serviceOperation</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>String_1</java-variable-name>
<xml-element-name>String_1</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
I'll take a look at the ant task.
Thank you very much.
[1]http://download.oracle.com/otndocs/jcp/websvcs-1.0-fr-spec-oth-JSpec/
[2]http://otndnld.oracle.co.jp/document/products/wls/docs92/webserv/jsr109.html -
Combine Annotation Driven EJB Web Services with BPEL
Hi friends,
We developed two Annotation Driven EJB Web Service and deployed successfully .
webservice 1 accepts username and password as input and returns true if ldap authentication is successful.
webservice 2 accepts username and password,and groupname as input and returns true if user is part of ldap group.
How can we combine these two services in SOA with input (username,password,group) and output (isAuthenticated ,isGroupMember) using BPEL process...
Regards,
jdevI will create a schema with input as (username,password,group) and Output as (isAuthenticated ,isGroupMember).
Then based on your requirement you have to create either Sync or Async service.
From the BPEL process i will call the 2 webservices using webservice call.
On receiving the result, populate the output variable(isAuthenticated ,isGroupMember) and send as response.
Thanks,
Vijay -
Maintaing state with ejb web services
Hello,
I understand there are no straight way to maintain state with ejb web services. Basically I have a stateful session bean and I would like to maintain state across requests. What is the best/cleanest architecture I can use in order to maintain state with web services?
Any reply appreciated,
Julien.Here's how BEA suggests you do it:
http://e-docs.bea.com/wls/docs81/webserv/design.html#1058330 -
please help!!!
Hi! I've problems to deploy an ejb web services.
I've the following error:
Error instantiating compiler:
06/07/19 10:48:51 WARNING: EJBContainer.postInit
Error generating wrappers for file:/C:/Oracle/oc4j/j2ee/home/applications/EJB-WS-EAR/EJB-WS.jar
com.evermind.compiler.CompilationException: Error instantiating compiler: webservice artifact generation failed :java.lang.NullPointerException : null
used by: java.lang.NullPointerException
at oracle.j2ee.ws.common.mapping.JavaWsdlMappingMetadata.findPortMapping(JavaWsdlMappingMetadata.java:296)
at oracle.j2ee.ws.common.processor.config.ModelInfo.javaNameOfPort(ModelInfo.java:453)
at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.processPort(WSDLModeler.java:693)
at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.processService(WSDLModeler.java:651)
at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:393)
at oracle.j2ee.ws.common.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:207)
at oracle.j2ee.ws.common.processor.config.ModelInfo.buildModel(ModelInfo.java:167)
at oracle.j2ee.ws.common.processor.Processor.runModeler(Processor.java:72)
at oracle.j2ee.ws.server.codegen.WsCompile.run(WsCompile.java:448)
at oracle.j2ee.ws.server.codegen.ServerArtifactGenerator.generateCompilables(ServerArtifactGenerator.java:408)
... 15 more
I'm working with jwsdp 1.5 and Oracle OC4J Standalone v10.1.3
Do you have any idea?
Thanks in advance!Hello,
Could you send me you source and ear at: tugdual[dot]grall[at]oracle[dot]com
Regards
Tugdual Grall -
EJB Web Services Exception: missing field/property
Hello
I am having trouble creating EJB Web Services.
When i send the following XML-content:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<yq1:create xmlns:yq1="http://company.com/project/beans/local/">
<firstName>q</firstName>
<lastName>s</lastName>
<email>d</email>
<userName>f</userName>
<password>g</password>
</yq1:create>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I receive this response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException: Deserializing fails. Nested message: JAXB request bean 'com.company.project.beans.local.jaxws.Create@18eadca' is missing field/property with name 'firstName'.</faultstring>
<detail>
<yq1:com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException xmlns:yq1="http://sap-j2ee-engine/client-runtime-error">
<!-- com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException: Deserializing fails. Nested message: JAXB request bean 'com.company.project.beans.local.jaxws.Create@18eadca' is missing field/property with name 'firstName'. -->
</yq1:com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This is the code to my EJB and the interface:
@WebService(endpointInterface="com.company.project.beans.local.PersonLocal", portName="PersonBeanPort", targetNamespace="http://company.com/project/beans/local/", serviceName="PersonService")
@Stateless
public class PersonBean implements PersonLocal {
@PersistenceContext
private EntityManager em;
public void createAsObject(Person person) {
em.persist(person);
public void create(String firstName, String lastName, String email, String userName, String password) {
Person person = new Person(firstName, lastName, email, userName, password);
createAsObject(person);
@WebService(targetNamespace="http://company.com/project/beans/local/", name="PersonLocal")
@Local
public interface PersonLocal {
@WebMethod(operationName="createAsObject")
public void createAsObject(@WebParam(name="person")
Person person);
@WebMethod(operationName="create")
public void create(@WebParam(name="firstName")
String firstName, @WebParam(name="lastName")
String lastName, @WebParam(name="email")
String email, @WebParam(name="userName")
String userName, @WebParam(name="password")
String password);
Do you have any advice on how to resolve this problem?
Thanks in advance
VincentHi,
in case you want some specific text,you can raise the exception like this in your function module.
MESSAGE I001(ZPLATINO) RAISING EXCEPT1.
message class: ZPLATINO
exception : EXCEPT1
message no 001,
message text : CHECK ERROR PUSHKAR1
and your response will be like.:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client</faultcode>
<faultstring xml:lang="en">EXCEPT1</faultstring>
<detail>
<n0:Zpl.Exception xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<Name>EXCEPT1</Name>
<Text>CHECK ERROR PUSHKAR1</Text>
<Message>
<ID>ZPLATINO</ID>
<Number>001</Number>
</Message>
</n0:Zpl.Exception>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
I think this solves your problem.
points..points..:)
Message was edited by:
pushkar anand
Maybe you are looking for
-
I am trying to download Photoshop CS6 onto my Mac from the Adobe website, but I do not have a serial number. I made an Adobe ID, but the serial number is not under "My Products" nor have I received an email including a serial number. I do not know ho
-
Sending and setting up photo shop 3.0 for another computer?
I dont know if anyone could help me with this? My father has NO KNOWLEDGE OF COMPUTERS! He has several photos that he needs organized and I also have several of his photos on my computer that I already have organized in photoshop starter edition 3.0.
-
WRT54G v6 stopped seeing wireless networks
My laptop - windows xp - reports there are no wireless networks available, yet my 2nd laptop connects via wireless just fine and if I plug in an ethernet to my laptop that has issues with wireless, it works just fine too. My laptop was seeing my wir
-
I'm a Pro Tools user, who just did an "Archive and Install" installation of 10.5.8 over my 10.4.11 on my 2 Ghz G5, now Pro Tools won't launch. I checked the extensions folder and sure enough, the digidesign extensions were left behind. Can I revert
-
Basic steps to integrate SAP PM with GIS and SCADA
Dear Team, Can somebody tell me how we can integrate SAP PM with GIS and SCADA I want to know whether in any industry this kind of integration has been initiated or not. Regards, Amar Jadhav