[JBossWS] - Re: MTOM + WS Security = problem
by davideling
Thank you for your links mr_d, they are very interesting.
Now I'm sure that my Web Services behaviour is not correct :-( .
Request Headers
| POST /servizioJBossCipheredSigned/ServizioJBossCipheredSigned?datatype=JBossWSMessage HTTP/1.1
|
| Authorization: Basic bXlVc2VybmFtZTpteVBhc3N3b3Jk
|
| SOAPAction: ""
|
| Content-Type: text/xml; charset=UTF-8
|
| JBoss-Remoting-Version: 22
|
| User-Agent: JBossRemoting - 2.2.0 SP4 (Bluto)
|
| Host: 127.0.0.1:8181
|
| Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
|
| Connection: keep-alive
|
| Content-Length: 503592
|
Response Headers
| HTTP/1.1 200 OK
|
| Server: Apache-Coyote/1.1
|
| X-Powered-By: Servlet 2.4; JBoss-4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)/Tomcat-5.5
|
| Content-Type: text/xml;charset=UTF-8
|
| Transfer-Encoding: chunked
|
| Date: Mon, 25 Jun 2007 13:22:57 GMT
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057348#4057348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057348
18Â years, 10Â months
[JBoss Seam] - Re: UnitTesting and jBPM pageflow
by KnisterPeter
BTW: Here is my pageflow definition:
<?xml version="1.0" encoding="UTF-8"?>
| <pageflow-definition xmlns="http://jboss.com/products/seam/pageflow"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://jboss.com/products/seam/pageflow pageflow-1.2.xsd"
| name="register">
|
| <start-page name="register" view-id="/public/register.xhtml">
| <transition name="next" to="personRegistered">
| <action expression="#{register.register}" />
| </transition>
| </start-page>
|
| <decision name="personRegistered"
| expression="#{register.registered}">
| <transition name="true" to="login" />
| <transition name="false" to="confirm">
| <action expression="#{register.sendCode}" />
| </transition>
| </decision>
|
| <page name="confirm" view-id="/public/confirm.xhtml">
| <redirect />
| <transition name="next" to="isCodeCorrect" />
| </page>
|
| <decision name="isCodeCorrect"
| expression="#{register.codeCorrect}">
| <transition name="true" to="invite">
| <action expression="#{register.complete}" />
| </transition>
| <transition name="false" to="confirm" />
| </decision>
|
| <page name="invite" view-id="/public/secure/invite.xhtml">
| <redirect />
| <end-conversation />
| </page>
|
| <page name="login" view-id="/public/login.xhtml">
| <redirect />
| <end-conversation />
| </page>
|
| </pageflow-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057345#4057345
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057345
18Â years, 10Â months
[JBoss Seam] - Re: UnitTesting and jBPM pageflow
by KnisterPeter
The pageflow testing does not work for me. On subsequent requests the pageflow is lost and set to null.
Below is my code. Anyone can give me a hint on how to do this the correct way? There are no examples in seam releases or even cvs.
String id = new NonFacesRequest("/public/register.xhtml") {
|
| @Override
| protected void beforeRequest() {
| setParameter("c", "1");
| }
|
| @Override
| protected void renderResponse() throws Exception {
| Contexts.getSessionContext().set("person", new Person());
| Contexts.getSessionContext().set(
| "soapMailingJobCollectionAccess",
| mailingJobCollectionAccess);
| Contexts.getSessionContext().set("soapMailingJob", mailingJob);
| // setValue("#{campaign.id}", 1);
|
| Pageflow pageflow = Pageflow.instance(); //<-- Here the process instance is null (correct)
| pageflow.begin("register"); //<-- Here the process instance is 'register' (correct)
| assertEquals("register", pageflow.getNode().getName());
|
| assertEquals("/public/register.xhtml", getRenderedViewId());
| }
|
| }.run();
|
| id = new FacesRequest("/public/register.xhtml", id) {
|
| @Override
| protected void processValidations() throws Exception {
| assertTrue(validateValue("#{person.id.email}", email));
| assertTrue(validateValue("#{person.salutation}", "MR"));
| assertTrue(validateValue("#{person.mobile}", mobile));
| assertFalse(isValidationFailure());
| }
|
| @Override
| protected void updateModelValues() throws Exception {
| setValue("#{person.id.email}", email);
| setValue("#{person.salutation}", Salutation.MR);
| setValue("#{person.mobile}", mobile);
| }
|
| @Override
| protected void invokeApplication() throws Exception {
| Pageflow pageflow = Pageflow.instance(); //<-- Here the process instance is null (WRONG!!!)
| pageflow.navigate(getFacesContext(), "next");
| assertEquals("confirm", pageflow.getNode().getName());
| }
|
| @Override
| protected void renderResponse() throws Exception {
| assertEquals("Test Campaign",
| getValue("#{person.id.campaign.name}"));
| // XXX: (JBSEAM-1529) Gives NPE
| // assertTrue(FacesMessages.instance().getCurrentGlobalMessages()
| // .isEmpty());
|
| Iterator<FacesMessage> messages = FacesContext
| .getCurrentInstance().getMessages();
| assertTrue(messages.hasNext());
| assertEquals("msgPasswordSend", messages.next().getSummary());
| assertEquals("/public/confirm.xhtml", getViewId());
| assertTrue(isLongRunningConversation());
| }
|
| }.run();
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057343#4057343
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057343
18Â years, 10Â months
[Remoting] - Un/Marshaller not found
by hurzeler
I am trying to have a socket server accepting plain text. I defined my service as:
| <server>
| <mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.remoting:service=Connector,transport=Socket"
| display-name="Socket transport Connector">
| <attribute name="Configuration">
|
| <config>
|
| <invoker transport="socket">
| <!-- The following are specific to socket invoker -->
| <attribute name="numAcceptThreads">1</attribute>
| <attribute name="maxPoolSize">303</attribute>
| <attribute name="clientMaxPoolSize" isParam="true">304</attribute>
| <attribute name="socketTimeout">60000</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">8084</attribute>
| <attribute name="enableTcpNoDelay" isParam="true">false</attribute>
| <attribute name="backlog">200</attribute>
| <attribute name="datatype" isParam="true">invocation</attribute>
| <attribute name="marshaller" isParam="true">com.test.socket.V75SocketServer.TextMarshaller</attribute>
| <attribute name="unmarshaller" isParam="true">com.test.socket.V75SocketServer.TextUnMarshaller</attribute>
| <attribute name="serverSocketClass">com.test.socket.V75SocketServer.SimpleInputStreamWrapper</attribute>
| </invoker>
|
| <handlers>
| <handler subsystem="V75">com.test.socket.V75SocketServer.Handler</handler>
| </handlers>
| </config>
| </attribute>
|
| </mbean>
| </server>
|
on deployment I get the following on the server:
| Invoker started for locator: InvokerLocator [socket://x.x.x.x:8084/?clientMaxPoolSize=304&datatype=invocation&enableTcpNoDelay=false&marshaller=com.test.socket.V75SocketServer.TextMarshaller&unmarshaller=com.test.socket.V75SocketServer.TextUnMarshaller]
|
When I debug I see that my SimpleInputStreamWrapper is used but my marshaller/unmarshaller is not and I subsequently get the following exception:
23:13:00,031 ERROR [ServerThread] failed to process invocation.
| java.io.StreamCorruptedException: invalid stream header
| at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
| at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
| at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:73)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
| at org.jboss.remoting.serialization.SerializationManager.createRegularInput(SerializationManager.java:44)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:123)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:350)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
|
What am I missing? Please Help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057342#4057342
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057342
18Â years, 10Â months