vishnu_1984 0 Newbie Poster

I am consuming a webservice which takes in 10 parameters.
The aim of the call to the webservice is to obtain a Task ID.All the parameters for the call are supplied from a JSP page(using JSF).
The following is the web service call

return mySoap.addTaskToProject(ticket, projectId, srcLangId, tarLangId, componentId, subjectId, taskId, subTaskId, volume, uomId);

The following is the JSP page:

<html>
	<body>


	<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;" width="100%" rowClasses="wizardSectionHeading">
	<h:outputText value="#{msg.selectedc}" escape="false" />
	</h:panelGrid>

	<h:panelGrid columns="2">
	<h:outputText value="Uploaded Content :"/>
	<h:outputText id="text3" value="#{DialogManager.bean.name}" />
	</h:panelGrid>



	<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;" width="100%" rowClasses="wizardSectionHeading">
	
	<h:outputText value="#{msg.language}:"/>
	</h:panelGrid>




	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:column>
	<h:outputText value="Select a Source Language : "/>
	<h:selectOneMenu value="#{FreewayDocumentDetailsDialog.srcLang}">
	<f:selectItem itemValue="en-ca" itemLabel="English(Canada)"/>
	<f:selectItem itemValue="en-us" itemLabel="English(United States)"/>
	<f:selectItem itemValue="fr-ca" itemLabel="French(Canada)"/>
	<f:selectItem itemValue="es-es" itemLabel="Spanish(Spain)"/>

	</h:selectOneMenu>
	</h:column>
	</h:panelGrid>



	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:outputText value="Select Target Language : "/>
	<h:selectManyListbox id="subscriptions" value="#{FreewayDocumentDetailsDialog.nameList}">
	<f:selectItem id="item1"  itemLabel="French(France)" itemValue="fr-fr" />
	<f:selectItem id="item2"  itemLabel="Chinese(Simplified)" itemValue="zh-cn" />
	<f:selectItem id="item3"  itemLabel="Chinese(Taiwan)" itemValue="zh-tw" />
	<f:selectItem id="item4"  itemLabel="Danish" itemValue="da-dk" />
	<f:selectItem id="item5"  itemLabel="Dutch(The Netherlands)" itemValue="nl-nl" />
	<f:selectItem id="item6"  itemLabel="French(Canada)" itemValue="fr-ca" />
	<f:selectItem id="item7"  itemLabel="Germany(Germany)" itemValue="de-de" />
	<f:selectItem id="item8"  itemLabel="Italian(Italy)" itemValue="it-it" />
	<f:selectItem id="item9"  itemLabel="Japanese" itemValue="ja-jp" />
	<f:selectItem id="item10" itemLabel="Korean" itemValue="ko-kr" />
	<f:selectItem id="item11" itemLabel="Norwegian(Bokmal)" itemValue="nb-no" />
	<f:selectItem id="item12" itemLabel="Spanish(LAS)" itemValue="es-XL" />
	<f:selectItem id="item13" itemLabel="Spanish(Mexico)" itemValue="es-mx" />
	<f:selectItem id="item14" itemLabel="Spanish(Spain)" itemValue="es-es" />
	<f:selectItem id="item15" itemLabel="Swedish" itemValue="sv-se" />
	<f:selectItem id="item16" itemLabel="Flemish" itemValue="nl-be" />
	<f:selectItem id="item17" itemLabel="Russian(Russia)" itemValue="ru-ru" />
	<f:selectItem id="item18" itemLabel="Basque" itemValue="es-eu" />
	<f:selectItem id="item19" itemLabel="Catalan" itemValue="ca-es" />
	<f:selectItem id="item20" itemLabel="English(United Kingdom)" itemValue="en-gb" />
	<f:selectItem id="item21" itemLabel="Galician" itemValue="es-gl" />
	<f:selectItem id="item22" itemLabel="Valencian" itemValue="es-vl" />

	</h:selectManyListbox>
	</h:panelGrid>





	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:outputText value="Project Name:"/>
	<h:inputText value="#{FreewayDocumentDetailsDialog.projName}" />
	</h:panelGrid>



	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:outputText value="PO Reference:"/>
	<h:inputText value="#{FreewayDocumentDetailsDialog.projectReference}" />
	</h:panelGrid>



	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:outputText value="Special Instruction:"/>
	<h:inputTextarea id="comments" value="#{FreewayDocumentDetailsDialog.splInst}" />
	</h:panelGrid>


		<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;" width="100%" rowClasses="wizardSectionHeading">
	
	<h:outputText value="Add Task:"/>
	</h:panelGrid>



	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:column>
	<h:outputText value="Available Tasks: "/>
	<h:selectOneMenu value="#{FreewayDocumentDetailsDialog.availabletasks}">
	<f:selectItem itemValue="Translation" itemLabel="Translation-LP"/>
	</h:selectOneMenu>
	</h:column>
	</h:panelGrid>

	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:column>
	<h:outputText value="Available Components: "/>
	<h:selectOneMenu value="#{FreewayDocumentDetailsDialog.availablecomponents}">
	<f:selectItem itemValue="documentation" itemLabel="Documentation"/>
	<f:selectItem itemValue="olhelp" itemLabel="On-line Help"/>
	</h:selectOneMenu>
	</h:column>
	</h:panelGrid>

	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:column>
	<h:outputText value="Available Subjects: "/>
	<h:selectOneMenu value="#{FreewayDocumentDetailsDialog.availablesubjects}">
	<f:selectItem itemValue="Chemical" itemLabel="Chemical"/>
	<f:selectItem itemValue="Engineering" itemLabel="Engineering"/>
	<f:selectItem itemValue="General" itemLabel="General"/>
	</h:selectOneMenu>
	</h:column>
	</h:panelGrid>


	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:column>
	<h:outputText value="Available Sub-Tasks: "/>
	<h:selectOneMenu value="#{FreewayDocumentDetailsDialog.availablesubtasks}">
	<f:selectItem itemValue="lessequal50" itemLabel="<=50%-<=50%"/>
	<f:selectItem itemValue="hundred" itemLabel="100%-100%"/>
	<f:selectItem itemValue="fiftyseventy4" itemLabel="50-74%-50-74%"/>
	<f:selectItem itemValue="seventyfive84" itemLabel="75-84%-75-84%"/>
	<f:selectItem itemValue="eightyfive94" itemLabel="85-94%-85-94%"/>
	<f:selectItem itemValue="ninetyfive99" itemLabel="95-99%-95-99%"/>
	<f:selectItem itemValue="autotranslate" itemLabel="AutoTransl-AutoTransl"/>
	<f:selectItem itemValue="certification" itemLabel="Certification-Certification"/>
	<f:selectItem itemValue="newwords" itemLabel="NewWords-NewWords"/>
	<f:selectItem itemValue="repetitions" itemLabel="Repetitions-Repetitions"/>
	<f:selectItem itemValue="review" itemLabel="Review-Review"/>
	<f:selectItem itemValue="updWords" itemLabel="Upd.Words-Upd.Words"/>
	<f:selectItem itemValue="validation" itemLabel="Validation-Validation"/>
	<f:selectItem itemValue="xranslated" itemLabel="Xtranslated-Xtranslated"/>
	</h:selectOneMenu>
	</h:column>
	</h:panelGrid>

	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:outputText value="Volume: "/>
	<h:inputText value="#{FreewayDocumentDetailsDialog.volume}" />
	</h:panelGrid>

	<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
	<h:column>
	<h:outputText value="UOM: "/>
	<h:selectOneMenu value="#{FreewayDocumentDetailsDialog.uom}">
	<f:selectItem itemValue="wordsWord" itemLabel="words-Word"/>
	</h:selectOneMenu>
	</h:column>
	</h:panelGrid>

		<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;" width="100%" rowClasses="wizardSectionHeading">
	
	<h:outputText value="Submit File "/>
	</h:panelGrid>
	</body>
	</html>

The thing which i am not able to understand is this error at my Tomcat console:

javax.xml.rpc.soap.SOAPFaultException: System.Web.Services.Protocols.SoapException: The specified SubjectID (Chemical) is invalid.
   at Service.AddTaskToProject(String Ticket, String ProjectID, String SourceLanguageID, String TargetLanguageID, String ComponentID, String SubjectID, String TaskID, String SubTaskID, Double Volume, String UOMID) in C:\Inetpub\my\App_Code\Service.vb:line 415
        at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:491)
        at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:307)
        at org.myclient.mySoap_Stub.addTaskToProject(mySoap_Stub.java:127)
        at org.alfresco.web.bean.content.FreewayDocumentDetailsDialog.createProjButtonImpl(FreewayDocumentDetailsDialog.java:238)
        at org.alfresco.web.bean.content.FreewayDocumentDetailsDialog.submit(FreewayDocumentDetailsDialog.java:1068)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at javax.faces.component.UICommand.broadcast(UICommand.java:89)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
        at sun.reflect.GeneratedMethodAccessor440.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:122)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy185.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:74)
        at sun.reflect.GeneratedMethodAccessor440.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:122)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy185.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
        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:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)

The ticket and project ID are available within the bean.The rest 8 parameters are made available frm the JSP.
On selecting fields like Subjects etc from my dropdown box, the web service call in the bean throws an error regarding the ID of the field.
Why is my web service call checking the dropdown box field id's!when all the required parameters have been passed to the service through my bean and its arrangement of setters and getters.


Thank You

Dani AI

Generated

The SOAP fault is coming from the service, not from Tomcat or JSF: the remote endpoint is rejecting the Subject value the page is sending. The usual causes are a mismatch between what the UI sends (a human label) and what the service expects (an internal ID/code or a different data type), or an unexpected collection vs. single-value being sent for a parameter.

Practical checks and fixes

  • Inspect the WSDL / service documentation to see the exact expected type and allowed values for the Subject parameter (and for the other parameters). Confirm whether the service wants an integer/GUID/code or a specific string token. The Java SOAP client will happily send whatever you give it; a server-side validation will return a SOAP fault if the value is not valid.
  • Log the actual outbound SOAP request on the client just before the call (or capture it with tcpmon/SoapUI) so you can see the literal value being transmitted. That makes it explicit whether you are sending a label like "Chemical", a numeric id, or a collection converted to a single string.
  • Align your JSF model with the service contract. If the service expects an ID, have the select component supply that ID (or translate the selected label to its ID in the backing bean). If the service expects a number, make the bean property a numeric type or provide a converter. If you are using multi-select controls, ensure the service accepts multiple values or join/iterate as required.

Small validation checklist

  • Confirm case, whitespace and exact token format (some services are strict).
  • Test a minimal valid call with SoapUI to verify a known-good Subject value.
  • Add logging in the backing method just prior to the service call to print each parameter you will pass.

References: Java SOAP fault behavior and .NET SoapException documentation are useful background when debugging server-side validation (, SoapException docs).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.