Ok this exception began reproducing again (consistently). I was able to code a fix by adding 'targetNamespace = ""' like:
@WebResult(name = "predefinedSearchCriteria", targetNamespace = "") When I build 'mvn clean install' my two projects (one is the server [WAR] which uses the class to generate the WSDL, the other is the generated clients which uses the WSDL to generate the clients) using JDK 6, the above code is generated in target. If I build 'mvn clean install' my two projects using JDK 7, the above line looks like following: @WebResult(name = "predefinedSearchCriteria", targetNamespace = "http://server.ws.workflow.mm.nextgate.com/") b/c of this the JDK 7 build reproduces the UnmarshalException during test case execution in the web browser. The JDK 6 build does not reproduce. Please advise how I can get this to work with JDK 7. Is there some option I am missing? Here is the mvn console output for the generated-client build (using JDK 6): [INFO] Processing: /Users/arbisookazian/Documents/Versions/matchmetrix (trunk)/workflow/ws-client-generated/target/ws-server-resources/WEB-INF/classes/wsdl/WorkflowManagerWSService.wsdl [INFO] jaxws:wsimport args: [-s, /Users/arbisookazian/Documents/Versions/matchmetrix (trunk)/workflow/ws-client-generated/target/generated-sources/wsimport, -d, /Users/arbisookazian/Documents/Versions/matchmetrix (trunk)/workflow/ws-client-generated/target/classes, -wsdllocation, http://localhost:8080/test, -target, 2.1, -Xnocompile, /Users/arbisookazian/Documents/Versions/matchmetrix (trunk)/workflow/ws-client-generated/target/ws-server-resources/WEB-INF/classes/wsdl/WorkflowManagerWSService.wsdl] parsing WSDL... generating code... When I view the WSDL in diff merge tool for JDK 6 version vs. JDK 7 version there are 3 differences. Here is the cxf maven plugin I am using for the WSDL generation: <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-java2ws-plugin</artifactId> <version>2.7.11</version> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.7.11</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-simple</artifactId> <version>2.7.11</version> </dependency> </dependencies> <executions> <execution> <id>process-classes</id> <phase>process-classes</phase> <goals> <goal>java2ws</goal> </goals> <configuration> <outputFile>${project.build.directory}/cxf/java2ws/wsdl/WorkflowManagerWSService.wsdl</outputFile> <className>com.nextgate.mm.workflow.ws.server.WorkflowManagerWS</className> <genWsdl>true</genWsdl> <verbose>true</verbose> <portname>WorkflowManagerWSPort</portname> <address>http://localhost:8181/ws/wf/WorkflowManagerWS</address> <databinding>jaxb</databinding> <frontend>jaxws</frontend> </configuration> </execution> </executions> </plugin> -- View this message in context: http://cxf.547215.n5.nabble.com/javax-xml-ws-soap-SOAPFaultException-Unmarshalling-Error-unexpected-element-tp5743794p5743974.html Sent from the cxf-user mailing list archive at Nabble.com.
