[JBossWS] - Re: how to set headers in JAX-WS
by tpawankumar
Hi Alessio,
This is the wsdl
<?xml version="1.0" encoding="utf-8" ?>
| <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://McAfeeAsap.com" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://McAfeeAsap.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
| <wsdl:types>
| <s:schema elementFormDefault="qualified" targetNamespace="http://McAfeeAsap.com">
| <s:element name="ProcessOrder">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="sOrderXML" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| <s:element name="ProcessOrderResponse">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="ProcessOrderResult" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| <s:element name="AuthHeader" type="tns:AuthHeader" />
| <s:complexType name="AuthHeader">
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="sToken" type="s:string" />
| </s:sequence>
| <s:anyAttribute />
| </s:complexType>
| </s:schema>
| </wsdl:types>
| <wsdl:message name="ProcessOrderSoapIn">
| <wsdl:part name="parameters" element="tns:ProcessOrder" />
| </wsdl:message>
| <wsdl:message name="ProcessOrderSoapOut">
| <wsdl:part name="parameters" element="tns:ProcessOrderResponse" />
| </wsdl:message>
| <wsdl:message name="ProcessOrderAuthHeader">
| <wsdl:part name="AuthHeader" element="tns:AuthHeader" />
| </wsdl:message>
| <wsdl:portType name="McAfee_x0020_Order_x0020_ProcessingSoap">
| <wsdl:operation name="ProcessOrder">
| <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">McAfee Order Processing</wsdl:documentation>
| <wsdl:input message="tns:ProcessOrderSoapIn" />
| <wsdl:output message="tns:ProcessOrderSoapOut" />
| </wsdl:operation>
| </wsdl:portType>
| <wsdl:binding name="McAfee_x0020_Order_x0020_ProcessingSoap" type="tns:McAfee_x0020_Order_x0020_ProcessingSoap">
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
| <wsdl:operation name="ProcessOrder">
| <soap:operation soapAction="http://McAfeeAsap.com/ProcessOrder" style="document" />
| <wsdl:input>
| <soap:body use="literal" />
| <soap:header message="tns:ProcessOrderAuthHeader" part="AuthHeader" use="literal" />
| </wsdl:input>
| <wsdl:output>
| <soap:body use="literal" />
| </wsdl:output>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:binding name="McAfee_x0020_Order_x0020_ProcessingSoap12" type="tns:McAfee_x0020_Order_x0020_ProcessingSoap">
| <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
| <wsdl:operation name="ProcessOrder">
| <soap12:operation soapAction="http://McAfeeAsap.com/ProcessOrder" style="document" />
| <wsdl:input>
| <soap12:body use="literal" />
| <soap12:header message="tns:ProcessOrderAuthHeader" part="AuthHeader" use="literal" />
| </wsdl:input>
| <wsdl:output>
| <soap12:body use="literal" />
| </wsdl:output>
| </wsdl:operation>
| </wsdl:binding>
| <wsdl:service name="McAfee_x0020_Order_x0020_Processing">
| <wsdl:port name="McAfee_x0020_Order_x0020_ProcessingSoap" binding="tns:McAfee_x0020_Order_x0020_ProcessingSoap">
| <soap:address location="http://testdrive.mcafeeasap.com/ws/mop/mop.asmx" />
| </wsdl:port>
| <wsdl:port name="McAfee_x0020_Order_x0020_ProcessingSoap12" binding="tns:McAfee_x0020_Order_x0020_ProcessingSoap12">
| <soap12:address location="http://testdrive.mcafeeasap.com/ws/mop/mop.asmx" />
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
and on the server side i don't have the implementation,it is third party service we are using.
But i knew there is a method processOrder which takes two parameters one is xmlstring and the other is authheader object.
The Jboss server i am using is Jboss 4.2.1 GA and jbossws is 1.2.1GA.
Please let me know if you have any suggestions?
Thanks,
Pavan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109706#4109706
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109706
17 years
[JBoss Seam] - Converter error after seam login
by terryb
I have a jsf/facelts page with 2 date fields, which I initalise to some default values (in bean) from Page Action.
It all works fine except:
when JBoss AS is freshly restarted and I click on the link to bring up the JSF page. In which case Seam forward to Login page, and after successful login attached error (javax.faces.convert.ConverterException: Value must be a date) is thrown. Error does not appear if I do not initalise date fields to default values.
Not sure how to avoid this error.
| @Name("paymentReconciliation")
| public class PaymentReconciliation {
|
|
| private Date settlementDateFrom = null;
| private Date settlementDateTo = null;
|
| //called from page action to set dates values to some default
| public String pageAction() {
| if (settlementDateFrom == null) {
|
| setSettlementDateFrom(DateTime.getMonthBegin(DateTime.offsetMonth(DateTime.clearTime(new Date()), -1)));
| }
|
| if (settlementDateTo == null) {setSettlementDateTo(DateTime.getMonthEnd(DateTime.offsetMonth(DateTime.clearTime(new Date()), -1)));
| }
| return "";
| }
|
| ...
| }
| XHTML
| ...
| <h:outputLabel for="settlementDateFromRichPanel">Settlement date from</h:outputLabel>
| <h:panelGrid id="settlementDateFromPanel" columns="2" width="100%" rowClasses="calendar-row" columnClasses="ecol1, ecol2">
| <a4j:outputPanel id="settlementDateFromRichPanel" layout="block">
| <rich:calendar value="#{paymentReconciliation.settlementDateFrom}"
| popup="true" datePattern="dd-MM-yyyy" enableManualInput="true" id="settlementDateFrom"/>
| </a4j:outputPanel>(dd-mm-yyyy)
| </h:panelGrid>
|
| <h:outputLabel for="settlementDateToRichPanel">Settlement date to</h:outputLabel>
| <h:panelGrid id="settlementDateToPanel" columns="2" width="100%" rowClasses="calendar-row" columnClasses="ecol1, ecol2">
| <a4j:outputPanel id="settlementDateToRichPanel" layout="block">
| <rich:calendar value="#{paymentReconciliation.settlementDateTo}"
| popup="true" datePattern="dd-MM-yyyy" enableManualInput="true" id="settlementDateTo"/>
| </a4j:outputPanel>(dd-mm-yyyy)
| </h:panelGrid>
| ....
|
| Error
| 11:19:40,059 ERROR [DebugPageHandler] redirecting to debug page
| javax.faces.convert.ConverterException: Value must be a date.
| at javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:390)
| at org.jboss.seam.pages.Param.getValueFromRequest(Param.java:144)
| at org.jboss.seam.core.Pages.applyRequestParameterValues(Pages.java:633)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRestoreView(AbstractSeamPhaseListener.java:73)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:95)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109699#4109699
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109699
17 years