Send events from a web service to subscribers
Hi,
In many programming interfaces in addition to the result returned by the method and an exception that can occur, you're able to receive asynchronous notification (aka events). My question is how this is enabled with web services. Let me give an example:
The service foo has one operation called moo.
MooInput is the input message for moo()
MooOutput is the output message for moo()
MooFault is the fault message for moo()
Is it possible to be able to send events from moo during its execution to consumers listening to its events? if so, how are these expressed in the WSDL of foo?
Thanks,
Dawg
dawgie wrote:
That would be grand! I hope you didn't misunderstand me...I meant "if I were you I'd knock up a simple web service..."
>
I'll try to give more context on what I'm trying to understand. I'm looking at the manageability of web services (and services in general, e.g. UPnP). Especially at the moment I'm looking at the analogy of SNMP asynchronous events. The purpose of this would be later to compose events coming from multiple web services in BPEL compositions for management of service compositions as part of my research. I do need however the events that the service may send to be manifested somehow in the WSDL. Hope I'm not asking for too much :)
I've never actually tried anything with WSDM/WS-Management and I was hoping I'd be able to avoid them this time as well...
Thanks!Which all sounds like it's the sort of thing Notification should handle, if the specs are anything to go by. But without actually trying to put it all together I couldn't say how well it works with current packages (ie Axis 2 and JWS).
Similar Messages
-
Send an event from Java Web Service to BPEL
Hi,
I have a requirement where from an Async BPEL service I have to call a Java Web Service. After the completion of its task Java Web Service will fire an event that has to be consumed by the BPEL to initiate further process. Can anybody help me with how to send an event from Java Web Service and at the same time consume it in BPEL?
Thanks,
AnujSee the following posts for your answer
http://blogs.oracle.com/soabpm/entry/event_delivery_network_chapter
http://blogs.oracle.com/soabpm/entry/using_the_event_api_to_publish
http://guidoschmutz.wordpress.com/2010/01/12/using-the-event-api-to-publish-an-event-to-the-event-delivery-network-edn-the-spring-way/ -
How do I send XML to a web service?
I am brand new to Flex. I am trying to write a program that
uses web services to send and receive data. I have gotten it so
that it can receive XML from the web service. However, I also need
to send it, and I am stuck.
I have tried the following code:
<mx:WebService id="MyService"
wsdl="
http://localhost/FlexTest/service1.asmx?WSDL"
useProxy="false"
result="resultHandler(event)">
<!-- Input: XML Document...Output: String -->
<mx:operation
name="HelloPersonAcceptsXmlDocumentReturnsString">
<mx:request>
<personXmlDoc>xmlPerson</personXmlDoc>
</mx:request>
</mx:operation>
<!-- Input: XML Node...Output: String -->
<mx:operation
name="HelloPersonAcceptsXmlNodeReturnsString">
<mx:request>
<personXmlNode>
xmlPerson.Person
</personXmlNode>
</mx:request>
</mx:operation>
<!-- Input: String (XML Format)...Output: String -->
<mx:operation
name="HelloPersonAcceptsXmlStringReturnsString">
<mx:request format="xml">
<personXmlString><p1:Person xmlns:p1="
http://impact-tech.com/schemas/FlexTest"><p1:ID>f1bd45fc-544b-489d-83cf-349d1f9740ec</p1:I D><p1:FirstName>Joe</p1:FirstName><p1:MiddleName>C.</p1:MiddleName><p1:LastName>Blow</p1:L astName><p1:BirthDate>2006-09-11T14:03:04.4755443-04:00</p1:BirthDate><p1:IsMarried>false< /p1:IsMarried><p1:NumChildren>0</p1:NumChildren><p1:NetWorth>100000</p1:NetWorth></p1:Pers on></personXmlString>
<!--<personXmlString>{xmlPerson.toXmlString()}</personXmlString>-->
<!--<personXmlString>{txInput.text}</personXmlString>-->
</mx:request>
</mx:operation>
</mx:WebService>
In the first operation,
"HelloPersonAcceptsXmlDocumentReturnsString", I try to send an XML
object. In the second operation,
"HelloPersonAcceptsXmlNodeReturnsString", I try to send the root
node, xmlPerson.Person. In both cases, what actually gets sent is
literally the text that I put in the <request>node, not the
object that text is referencing. So for the first, "xmlPerson" gets
sent to the target, not the XML doc that it refers to.
In the third operation, I tried three different things, and
two are commented out. I tried to reference the XML object using
the toXmlString() method, but again, it literally sent the text
"xmlPerson.toXmlString()". I tried the curly-brace binding, but
then nothing gets sent to the web service. I also tried building
the actual XML document node by node, with values, but I get an
error from the web service saying it can't be parsed because there
is an illegal character at Line 1, Position1. The only thing which
has worked has been to add an Input Text box, copy-and-paste the
exact same XML structure as I tried to manually build, and then use
binding to the text property of the InputText control. Then it
works fine. But I can't actually do that, it's just for testing.
So my question is how to make a <request> node that is
part of the web service operation that references an object and
sends the value of that object to the web service, not literally
whatever text is typed in that node. I looked at the Web Services
and Data Binding sections of the help, and didn't see any examples
covering this. Everything was far more simplistic with binding to
controls. Can anyone help a newbie, please?I don't understand how this isn't a Flex Builder question,
since it has to do with how Flex Builder interacts with web
services and how objects are used in binding in MXML.
But at any rate, I got this code to work, for future
reference of anyone else looking in this forum:
Declaring a custom class in MXML was key to allow proper
binding:
<CustomClasses:Person id="testPerson" xmlns:local="*"/>
<mx:WebService id="MyService"
wsdl="
http://66.129.123.211/FlexTest/service1.asmx?WSDL"
useProxy="false"
result="resultHandler(event)">
<!-- Input: XML Document...Output: String -->
<mx:operation
name="HelloPersonAcceptsXmlDocumentReturnsString">
<mx:request>
<personXmlDoc>{testPerson.GetXmlDoc()}</personXmlDoc>
</mx:request>
</mx:operation>
</mx:WebService> -
Hi
I tried to do the first part of the How to guide "Integrate Visual Composer Applications and BEX WEB Templates", but I'm having trouble with item 5 (Sending events from VC to WAD). I can select my entry list as Dynamic, select the data service, find the query and the characteristic 0CALYEAR. I add the input field and the assigned value according to the instructions. However when I deployed the model I get a warning, saying that my entry list is empty in my Selection form that I just added the dynamic values.
As a result when I preview my page it's not showing anything in my dropdown list.
If I open the dropdown list and click on entry list, it shows the static radio button selected not the dynamic. I click on the dynamic radio button and I can see that all the values and the data service entered before are still there.
Any ideas why this is happening?
Thank you,
Message was edited by: Michelle MachadoHi Prakash,
As guided this article speaks of passing only 1 parameter to the WAD but here I have the case of passing around 5 params to
the WAD application each can have multiple values....
Can you pease guide how this can be achieved as I modified your code but it accepts only last parameter.
Awaiting your response......
Thx in advance.....
Regards,
Ankeet Pujara -
Null Values From MS Web Services Toolkit Client
Hi,
I've been bashing my head against a wall on this one for too long now.
I've got a JAX-WS web service deployed to Glassfish v2 b33 which works fine when called by a Java client. It also works fine when methods with no parameters are called from the MS client, i.e. simple and complex types are returned as they should be. However the problem I am having is that when the web service methods that take parameters are called from the MS client, the values received by the service are always null. I've montitored the service and values are being sent in the soap request, but a simple System.out.println statement in the first line of the method indicates a null value. I've captured a request from the Java client and the MS client to show the difference:
A java request:
<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/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns0:getConfig xmlns:ns0="http://ws.firestorm.alternativenetworks.com/">
<arg0>Inbound</arg0>
</ns0:getConfig>
</soapenv:Body>
</soapenv:Envelope>and a request from the web services toolkit:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>I've tried everything I can think of, including changing the style from RPC/LITERAL to DOCUMENT/LITERAL, but the Java web service just seem to like the way the SOAP message is wrapped up.
Any help on this would be greatly appreciated.
Cheers
TonyThanks Milan, your suggestion put me on the right track, however I've hit another snag.
I decided the best way to solve the problem was to use the Glassfish Transformation Rules feature to take the SOAP request and transform it to a valid format before reaching the code. The XSLT file I created looks like this (I'm no XSLT guru so this will definitely need some tidying up, but for now it works): <?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*">
<xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:copy>
</xsl:template>
<xsl:template match="/SOAP-ENV:Envelope/SOAP-ENV:Body/*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:for-each select="*">
<xsl:text disable-output-escaping="yes"><arg</xsl:text>
<xsl:value-of select="position() - 1"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes"></arg</xsl:text>
<xsl:value-of select="position() - 1"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
</xsl:for-each>
</xsl:copy>
</xsl:template>
</xsl:stylesheet> which transforms the problem SOAP request: <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> to the following valid format: <?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
<arg0>Inbound</arg0>
</SOAPSDK4:getConfig>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> But when I load the .xsl file using the Transformation Rules page and call the web service using the Microsoft Web Services Toolkit, I'm getting the following exception: [#|2007-05-11T09:23:46.530+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=15;_ThreadName=Thread-15;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530]]|#]
[#|2007-05-11T09:27:31.675+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=12;_ThreadName=httpWorkerThread-4848-0;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675]]|#]
[#|2007-05-11T09:28:00.269+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
ERROR: ''|#]
[#|2007-05-11T09:28:00.285+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
com.sun.enterprise.admin.wsmgmt.transform.TransformException: javax.xml.transform.TransformerException: java.lang.NullPointerException
at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:238)
at com.sun.enterprise.admin.wsmgmt.transform.TransformFilter.process(TransformFilter.java:144)
at com.sun.enterprise.admin.wsmgmt.filter.spi.FilterRouter.applyFilters(FilterRouter.java:69)
at com.sun.enterprise.admin.wsmgmt.agent.GlobalMessageListenerImpl.processRequest(GlobalMessageListenerImpl.java:181)
at com.sun.enterprise.webservice.monitoring.WebServiceEngineImpl.processRequest(WebServiceEngineImpl.java:265)
at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRequest(JAXWSEndpointImpl.java:53)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:127)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
at com.sun.xml.ws.mex.server.MetadataServerPipe.process(MetadataServerPipe.java:97)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:191)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:113)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:208)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:374)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:100)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:74)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:187)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:328)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
Caused by: javax.xml.transform.TransformerException: java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:651)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:281)
at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:224)
... 54 more
Caused by: java.lang.NullPointerException
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1235)
at com.sun.org.apache.xalan.internal.xsltc.trax.TrAXFilter.parse(TrAXFilter.java:105)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:588)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:642)
... 56 moreCould this be a bug or am I doing something wrong?
Cheers again,
Tony -
I can't figure out data binding from a web service.
Hi,
I've been trying to figure out how to connect a TreeTable control with data from a non-SAP web server. Here's what I have so far;
I have a sample program that uses json in a variable called oData.
I have a TreeTable control named oTable.
I create a model;
var oModel = new sap.ui.model.json.JSONModel();
I feed the oData variable into it;
oModel.setData(oData);
Finally, I feed the oModel to the oTable;
oTable.setModel(oModel);
That all makes sense. What I want to do is get the data from a web service. The only examples I've been able to find show how to configure an SAP data service and then connect to that. They don't give any details of the format that the SAP data service is sending. I don't have access to an SAP system so I can't set one up to reverse-engineer the data. I'm going to be writting my own oData service for this so I need a couple of things;
1. An example of json or xml data as it's sent from a web server.
2. An example of how you pull that data from the web service to an SAP ui model.
I could really use some help. I haven't been able to find any examples that make sense to me.Hi Joe
Here is an small example. Maybe it is useful to you.
In this example, I bind the tree to /root and you can see that we have 0: 1: elements under each element recursively.
Thanks
-D -
Invoking one web service from another web service
Hi there,
I want to invoke a web service lets say X. But befor sending parameters to this web service, what i want to do is first pass the parameters to a web service called Y and Y will decide wether to call X or not. In other words i want to invoke a web service from another web service.
Its kind of urget so do the needful asap.
ThanksCalling another webservice from within a webservice does not require anything special. The service (say svc1) that calls another service (svc2) will be a web svc client. So you will have to do the same steps for svc1 as you would do for any other web service client
-
Erro while recieving a signed response from a web service
i'm not sure whether this is the right forum to post this topic, but anyways i'm going fwd as i was not able to find a rite one, if any body knows, plz redirect me to that, anyways below is my issue.
i'm using axis as a web service engine on my client side and getting a signed response from a web service.
But while recieving the response im gettng the following error.
Verification failed for URI "#id-13753285"
org.apache.ws.security.WSSecurityException: The signature verification failed
at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:332)
at org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:79)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:279)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:201)
at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:159)
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:190)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sterlingcommerce.www.mesa.GISBindingStub.executeLightweightJDBCAdapterQuery(GISBindingStub.java:210)
at client.MyClient.makeRequest(MyClient.java:105)
at client.MyClient.main(MyClient.java:134)
failed becoz of remote exception: org.apache.ws.security.WSSecurityException: The signature verification failed
Exception in thread "main" org.apache.ws.security.WSSecurityException: The signature verification failed
at org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:332)
at org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:79)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:279)
at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:201)
at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:159)
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:190)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sterlingcommerce.www.mesa.GISBindingStub.executeLightweightJDBCAdapterQuery(GISBindingStub.java:210)
at client.MyClient.makeRequest(MyClient.java:105)
at client.MyClient.main(MyClient.java:134)
below are my hadler configurations and properties file
<handler type="java:org.apache.ws.axis.security.WSDoAllReceiver" >
<parameter name="action" value="Signature"/>
<parameter name="user" value="signverf"/>
<parameter name="passwordCallbackClass" value="client.PWCallback"/>
<parameter name="passwordType" value="PasswordDigest"/>
<parameter name="signaturePropFile" value = "signatureVerifyCrypto.properties"/>
<parameter name="signatureKeyIdentifier" value="DirectReference"/>
</handler>properties file
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=password
org.apache.ws.security.crypto.merlin.keystore.alias=signverf
org.apache.ws.security.crypto.merlin.alias.password=password
org.apache.ws.security.crypto.merlin.file=certs/signverf/signverf_pubkeystore
commands i used to generate keystore:
keytool -import -alias signverf -file privCert4Sign.cer -keystore signverf_pubkeystore -storepass password
keytool -list -alias signverf -keystore signverf_pubkeystore
i tried goggling for this error,in one thread i got this is because of some issue in axis 1.4 which i'm using and if i try using axis 1.2, this will not come,
for the time i'm not able to download axis 1.2 from any of the apache mirrors :( ,
if some one can provide me the link,it will be really helpful.
also if anyone as faced similar issue or can see whats going wrong here, please reply.
also below is my soap response capture using tcpmon
<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/XMLSchema-instance">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><ds:Signature Id="Signature-18290758" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:Reference URI="#id-13753285" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">jAaM4xp/2ZOch7iqyyLynojMpV0=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
JiOjIFgJ2qMvzJsirbjgV7AeDWfsS0Ak3xzue1nK+LXELM3tZ/h/eFyxCLZfLk+553vJbmnlU423
8NgjgngYcYa+bB6yTovZJKB66LdQEHLpmTX4WNteLrcVOBfHyZcJCKemF2XyaF4yX03XGAIdNnFV
1d8wZQcBgakPIrjJGAZtwo94bYBlL/MJedBP819Ecf/N6hEmafFxHD46Xapi+HdcDjQmCqxaol/I
bQuM3ikJJ2v+46bQNKEWavdG7lIicjUsvH3xpyzZthj26nAHV6nAOEe8tybKhKLga6KDM+3eAJNq
3s52yZTz68n7z5AijdmhMkc7ivCxELBx5TQYsw==
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-20631690" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference wsu:Id="STRId-5317380" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3">MIIDLDCCAhSgAwIBAgICBNIwDQYJKoZIhvcNAQEFBQAwTzEWMBQGA1UEAwwNcHJpdkNlcnQ0U2lnbjEMMAoGA1UECgwDYWJzMQswCQYDVQQGEwJVUzEaMBgGCSqGSIb3DQEJARYLeHl6QGFiYy5jb20wHhcNMDcwOTA0MDQzNzMxWhcNMDgwMzAyMDQzNzMxWjBPMRYwFAYDVQQDDA1wcml2Q2VydDRTaWduMQwwCgYDVQQKDANhYnMxCzAJBgNVBAYTAlVTMRowGAYJKoZIhvcNAQkBFgt4eXpAYWJjLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJSG2UR8nMAxctBlR5YSnEVeuHNFMM7t8YQX6J8GRausKPXyDT4pIfPHRaeag62K4cUhBDYBLyUmZqYTZBHpKISgYkYsXqYHoB4gif664rZvpMKw+cTpD/3WzViOeHHWfQM5/XUatLBPXzRUB78PcM9RnCEeznKUEPoWxTfl2qsR0d4CxOVzH9dHn6JCEaQQWzntH61YCw4Qm6Kq78+sLfnv7CBrg/NYewFX9JozZk7UzlmPZWCm7pp2d4UDn1KB7nLnLFxD6aMgjAikWKAU4h15ihJxu6Appc+ggAdAV/jQiaIeAtokfe2Iw1bUh8SOOR8iUa9lK0Jf6C/N9ZTnxCcCAwEAAaMSMBAwDgYDVR0PAQH/BAQDAgTwMA0GCSqGSIb3DQEBBQUAA4IBAQCKfRu1cXkwwnNZ+0brwT4iI1q/Ti/OVMWpP15Ob7bDE5rUjwpNUJXXlqKdOh7pkk1gLTiebQrMkd0ozpbi/Xdmea1xf9diCc4IApg6K9G4KACR2sLeXcKy7d4hakYqMLeaPJwBcd3V6DGiJgfP2S8Ui8rQzDpslTBM1+YaBdUVIv1/VCFO/K5I4lkPkjGDp/qDm4lXn3Mup9HG9INgklA02hPnYHWunVZm/5MZpEn4BYks+B3VqCXSAkRVD9aAuM3Tv4atblHDs3oKTV1awoVQbKkw+Eonnc/+Mex8A5sJ/8eUnQ3UPdT77U0+WcrvwFxoFP2e0J8xHW8N8b2fIr8H</wsse:KeyIdentifier></wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature></wsse:Security></soapenv:Header>
<soapenv:Body wsu:Id="id-13753285" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<mesa:processData xmlns:mesa="http://www.sterlingcommerce.com/mesa" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ProcessData>
<service>Test_Web2</service>
<b2b-protocol>http</b2b-protocol>
<transport-instance-id>MESAHttpServerAdapter_HttpServerAdapter_node1</transport-instance-id>
<SyncModeBP>false</SyncModeBP>
<http-request-uri>/soap-new</http-request-uri>
<transport-session-id>Fri Aug 31 14:04:57 IST 2007:110</transport-session-id>
<incomingSOAPTransportMode>http</incomingSOAPTransportMode>
<VERIFICATION_KEY/>
<DECRYPTION_KEY/>
<SECURITY_TOKEN_NAME>ST1</SECURITY_TOKEN_NAME>
<SIGNING_CERTIFICATE>blrgislin13:10.11.23.37:114bb0fb841:12328</SIGNING_CERTIFICATE>
<SIGNING_ALGO>http://www.w3.org/2000/09/xmldsig#rsa-sha1</SIGNING_ALGO>
<SIGNING_KEY_IDENTIFIER_TYPE>3</SIGNING_KEY_IDENTIFIER_TYPE>
<CANONICALIZATION_ALGO>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</CANONICALIZATION_ALGO>
<SIGNATURE_ENCRYPTION_ORDER>-1</SIGNATURE_ENCRYPTION_ORDER>
<SOAP_URI>/soap-new</SOAP_URI>
<SOAPEnvNSPrefix>soapenv</SOAPEnvNSPrefix>
<SOAPEnvNSURI>http://schemas.xmlsoap.org/soap/envelope/</SOAPEnvNSURI>
<messageMode>1</messageMode>
<query_type>SELECT</query_type>
<result_name>result</result_name>
<pool>mysqlPool</pool>
<row_name>row</row_name>
<sql>SELECT * FROM MBX_MAILBOX</sql>
<serviceMode>1</serviceMode>
<typeName>LightweightJDBCAdapterQuery</typeName>
<PrimaryDocument SCIObjectID="blrgislin13:10.11.23.37:114bb0fb841:19200"/>
<ADD_SOAP_ENVELOPING>false</ADD_SOAP_ENVELOPING>
<INSERT_SECURITY_HEADER>false</INSERT_SECURITY_HEADER>
</ProcessData>
</mesa:processData>
</soapenv:Body>
</soapenv:Envelope>
sorry for this long mail, but we are really stuck and need to move forward,
looking for your help.Hi,
The Service Control Manager will generate an event if a service does not respond within the defined timeout period (the default timeout period is 30000 milliseconds). You could modify the registry to increase the default time-out value for the service control
manager.
For more detailed information, please see:
Event ID 7011: Service Timeout
http://social.technet.microsoft.com/wiki/contents/articles/13765.event-id-7011-service-timeout.aspx
The Event 12362 indicates that a destination LUN could not be located or could not be restarted. You could refer to the article below to troubleshoot the issue:
Event ID 12362 — VSS Shadow Copy Provider Operations
http://technet.microsoft.com/en-us/library/ee264223(v=ws.10).aspx
Best Regards,
Mandy
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
How to send large files using web service
hello everyone,
I am new to this forum, so please pardon me if I post some silly problem...
I have created one service which sends file when client (jsp) request it. I am using JBOSS as my server. purpose of this application is when client request some fle then service will send this file... and most of the time we need to send only pdfs and ppts...
Problem is, this service sends txt, java files easily of any size but when i tried sending PDF, PPT then i got xml.SAXParseException.......
I thought this error is because of some characters, but how to fix it....
I am working on Linux.
code snippet is:
import java.io.*;
public class MyHelloService
public String file_size (String name)
String s = new String("");
byte[] sendata1=new byte[100];
try
System.out.println("name recived is :::::::::::"+name);
FileInputStream in=new FileInputStream(name);
int size=0;
size=in.available();
System.out.println("FILE SIZE IS:::::"+size);
byte[] sendata11=new byte[size];
i=in.read(sendata11);
System.out.println(new String(sendata11));
s=new String(sendata11);
catch(Exception e)
System.out.println("EXCEPTION IN JWS:::"+e);
s=new String("nofilefounderror");
return s;
pls tell me what am i doing wrong ad how to fix this?
and one more thing can i send byte array from a web service as i tried but couldnt do that... so i am reading everything in a single byte array and then converted to string.....
is it possibel to send file in a chunk?if yes, how to do that?
waiting for the reply..... pls reply as soon as possible....
Rashihi,
I am sending file from server to client i.e client will request for a file and service will send it back....... no socket connection is there...I am using JBOSS and apache axis.
pls help me out.....
Rashi -
Hi
In my scenario,we are sending plain request to web service using receiver sender adapter and PI will receive response as excel attachment. What are standard module required to achieve this and sequence? or checking Keep attachment box will help us to achieve this?
is it possible to receive excel sheet as attachment from receiver soap adapter ?
Thanks in AdvanceHi,
This issue might be due to the invalid .pem certificate file.
Make sure to include the beginning and end tags on each certificate.
The result should look like this:
-----BEGIN CERTIFICATE-----
(Your Primary SSL certificate: your_domain_name.crt)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Intermediate certificate: DigiCertCA.crt)
-----END CERTIFICATE-----
For more detailed information, you could refer to:
https://www.digicert.com/ssl-support/pem-ssl-creation.htm
Regards -
Trying to run a JSF page whose output i am getting from a Web Service
Hi
I am trying to run a JSF page containing a simple button and a outputText. On clicking the button ,the outputText field is populated with a value from a web service.
This page sometimes it runs fine else, on pressing the button nothing happens. In the message log it gives the following error:
Mar 6, 2007 12:03:33 PM oracle.webservices.client
WARNING: Unable to connect to URL: http://10.177.194.73:8888/TopDownContractDevelopment-Service-context-root/CreditRatingServiceSoapHttpPort due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection timed out: connect
07/03/06 12:03:33 error--> java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection timed out: connect
Can somebody help me?
I am using port 8888. Actually in one of the demos , it is mentioned to use 8988. But using that it was giving the above error previously. But using 8888 it works sometimes , but sometimes it is not working.
Thanks in advance.
Regards
SabarishHi Raymond,
Thank you for your immediate replies :-)....
I have two jsp pages (inputName.jsp and greeting.jsp) as I mentioned earlier in the path /WebContent/jsp
and one index.jsp in the path jsfHello/
The index.jsp just forwards the control to the page inputName.jsp
the code snippet: <jsp:forward page="/jsp/inputName.jsf" />
When I try to access the application as below I can see the corresponding pages and it corresponding navigation:
http://localhost:8080/jsfHello/jsp/inputName.jsf ( When I input name and continue it navigated to the greeting page)
http://localhost:8080/jsfHello/jsp/greeting.jsf
When I try to access the application as below it doesn't work:
http://localhost:8080/jsfHello
http://localhost:8080/jsfHello/index.jsf
http://localhost:8080/jsfHello/jsp/inputName.jsp
Can you please let me know why and what is to be done to make my application work when I access the url as http://localhost:8080/jsfHello -
HTTP connection from OSB web service to external system via a Proxy Server
Dear experts,
May I know has anyone tried to use HTTP protocol to send a request from OSB web service to external system via a proxy server? Heard that we need to establish some sort of tunnel (socket) to talk to Proxy Server. Can you please any have sample code or configuration steps to share?
Thank you very much!!http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/global_resources.html#wp1137294
Adding Proxy Servers
Use the Summary of Proxy Servers page to add and configure Proxy Server resources and make them available in Oracle Service Bus as a system resource. You must be in an active session to configure or reconfigure Proxy Server resources.
1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Using the Change Center.
2. Select System Administration > Proxy Servers.
3. Click Add.
4. In the Name field, enter a name for the Proxy Server resource. This is a required field.
5. In the Description field, enter a short description for the Proxy Server resource.
6. In the Host-Port Parameters section, enter the following information:
1. In the Server Host field, enter the host name or IP address of the Proxy Server. This is a required field.
The Server Host name for the Oracle Service Bus proxy server must be identical to the server host name of the actual proxy server.
2. In the Clear Text Port field, enter the Proxy Server clear-text port number.
3. In the SSL Port field, enter the Proxy Server SSL port number. You must enter either a clear text or SSL port number.
4. Click Add.
You can configure multiple Proxy Servers for each Proxy Server resource. This enables Oracle Service Bus to perform load balancing and offer fault tolerance features for the Proxy Server resource.
7. If the Proxy Server performs proxy authentication, enter a user name in the User Name field, and the associated password in the Password and Confirm Password fields.
These fields are optional, and required only if the Proxy Server is secured.
8. Click Save to create and save the Proxy Server resource in the current session.
9. To end the session and deploy the configuration to the run time, click Activate under Change Center. -
How to retrieve data from a web service
Hi
i am at very beginner level about web services.
I am searching for a simple example of retrieving data from a web services, but cant find.
How can i get xml data from a web service. i dont need to develop the web service it is already ready, i just need how could i fetch data from it.
Can somebody point out or give an example?
Thanks in advanceHi,
just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
Frank -
Get xml data from a web service into Forms?
Hello folks! I am reading active directory info from a web service into forms via imported java classes. I can read from functions that return strings just fine, but I have to get the output from getGroupUsers which returns an XmlDataDocument. How do I read this in and parse it in Forms?
I will be grateful if y'all could point me to an example.
Thank you,
Gary
P.S. Here is a snippet of how I get the full name by passing an ID:
DECLARE
jo ora_java.jobject;
rv varchar2(100);
BEGIN
jo := ADSoapClient.new;
rv := ADSoapClient.getUserName(jo, 'user_ID');
:block3.fullname := rv;Hello,
Since you are already dealing with server-side JAVA, I would suggest you create a method that would do the parsing server-side and what your PL/SQL will be dealing with is just the return string.
Here is a method I use to read an XML file (actually, it is an Oracle Reports file converted to XML) and from the string version, I will do search, replace and other things.
So, from getGroupUsers which returns an XmlDataDocument, you can adapt this method to get your data server-side and let the form module read the output data.
<blockquote>
private String processFileXml(String fileName, int iFile) throws ParserConfigurationException, SAXException,
IOException, XPathExpressionException{
try{
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
InputStream inputStream = new FileInputStream(new File(fileName));
DocumentBuilder builder = domFactory.newDocumentBuilder();
Document doc = builder.parse(inputStream);
StringWriter stw = new StringWriter();
Transformer serializer = TransformerFactory.newInstance().newTransformer();
serializer.transform(new DOMSource(doc), new StreamResult(stw));
return stw.toString();
catch (Exception e){
System.err.println(e);
System.exit(0);
return "OK";
</blockquote>
Let me know if this is of nay help.
Thanks. -
Is it possible to return an array of objects from a web service?
I have been trying to do this for a while now, and I have come to the conclusion that it may be impossible. To demonstate what I want to do I enclose a simple java file [1]. I have deployed this with Axis 2 and I enclose the responce [2], it is obciously not wat I want.
Is it porrible to do this? If so, how?
Thanks for any help,
[1]
package org.impress;
public class SampleObject {
public SampleElement[] noParameters(){
SampleElement[] retArray = new SampleElement[2];
retArray[0] = new SampleElement();
retArray[0].name = "one";
retArray[0].value = "alpha";
retArray[1] = new SampleElement();
retArray[1].name = "two";
retArray[1].value = "beta";
return retArray;
public class SampleElement {
public String name;
public String value;
}[2]
<ns:noParametersResponse>
<ns:return type="org.impress.SampleObject$SampleElement"/>
<ns:return type="org.impress.SampleObject$SampleElement"/>
</ns:noParametersResponse>Hi
Can anybody help me with the code of how to return a resultset from a web service. i have put the resultset data's in an object array and tried to return it, but in the client side no data comes ,,, i mean it is printed as null.... and plz tell me where to specify the return type of a object in the wsdl file....
thanks..
Maybe you are looking for
-
Unable to print from HP Pavilion 17-f048ca to Brother printer
Hello, I've recently bought a brand new HP Pavilion 17-f048ca (windows 8.1). However, I've been unnable to connect my Brother printer to the laptop as it always resulted in a driver error. I am doing this via usb cable. I've tried all of the usb port
-
BI Content of BI 7.0 ABAP Trail Version
Hi, I have installed the BI 7.0 ABAP Trail Version on my home computer and it works well, but when I tried to activate some Infocubes from the BI Content, I saw there is only one Infoarea 'Techical Content' in BI Content. Can any one tell me where is
-
XML parsing a spesific value with DOM
Hi guys. I have the following xml file: <channel> <title>Java Technology Headlines</title> <link></link> <description>Technical content and news from java.sun.com, the premier source of information about the Java platform.</descript
-
Asha 501 can't fetch large MMS
My Nokia Asha will not receive pictures that are over a certain size limit. If I send a large photo to the Asha 501, it says "Can't download message." If I send a small photo to the Asha 501, it has no trouble displaying the photo. I have 64MBs of fr
-
We are using a vbscript to assign a Outlook 2010 signature to the users that are logging in the network. A few things are a problem. First the logo is different when we open it in a editor it looks sharp etc. In Outlook it looks less sharp and smalle