Now there's a clue. There is a WebParam annotation, but it defines empty values. From the interface file...
@WebService(targetNamespace = "http://www.service-now.com/fooservice", name = "ServiceNowSoap") @XmlSeeAlso({ObjectFactory.class}) public interface ServiceNowSoap { @WebResult(name = "getRecordsResult", targetNamespace = "") @RequestWrapper(localName = "getRecords", targetNamespace = "http://www.service-now.com/ fooservice ", className = "com.service_now. fooservice.GetRecords") @WebMethod(action = "http://www.service-now.com/ fooservice /getRecords") @ResponseWrapper(localName = "getRecordsResponse", targetNamespace = "http://www.service-now.com/ fooservice ", className = "com.service_now. fooservice.GetRecordsResponse") public java.util.List<com.service_now.cmdb_ci_comm.GetRecordsResponse.GetRecordsResult> getRecords( @WebParam(name = "asset", targetNamespace = "") -----Original Message----- From: Johan Edstrom [mailto:[email protected]] Sent: Thursday, May 23, 2013 14:39 To: [email protected] Subject: Re: CXF client expects namespace, server doesn't send one. Ouch, then it kinda sorta looks like the server might be wrong. You'd find the WebParams in the generated interface class. On May 23, 2013, at 12:37 PM, David Nedrow <[email protected]> wrote: > Doing this WSDL first. I pulled the WSDL directly from the server. I had > actually found the thread you linked to, but it isn't much help. A lot of > people talk about modifying the @WebParam annotation, but the CXF wsdl2java > doesn't generate any @WebParams. > > Here's a sample of the generated client code... > > > package com.service_now.fooservice; > > import javax.xml.bind.annotation.XmlAccessType; > import javax.xml.bind.annotation.XmlAccessorType; > import javax.xml.bind.annotation.XmlElement; > import javax.xml.bind.annotation.XmlRootElement; > import javax.xml.bind.annotation.XmlType; > > > /** > * <p>Java class for anonymous complex type. > * > * <p>The following schema fragment specifies the expected content contained > within this class. > * > * <pre> > * <complexType> > * <complexContent> > * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> > * <sequence> > * <element name="sys_id" > type="{http://www.w3.org/2001/XMLSchema}string"/> > * <element name="__use_view" > type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> > * </sequence> > * </restriction> > * </complexContent> > * </complexType> > * </pre> > * > * > */ > @XmlAccessorType(XmlAccessType.FIELD) > @XmlType(name = "", propOrder = { > "sysId", > "useView" > }) > @XmlRootElement(name = "get") > public class Get { > > @XmlElement(name = "sys_id", required = true) > protected String sysId; > @XmlElement(name = "__use_view") > protected String useView; > > /** > * Gets the value of the sysId property. > * > * @return > * possible object is > * {@link String } > * > */ > public String getSysId() { > return sysId; > } > > /** > * Sets the value of the sysId property. > * > * @param value > * allowed object is > * {@link String } > * > */ > public void setSysId(String value) { > this.sysId = value; > } > > /** > * Gets the value of the useView property. > * > * @return > * possible object is > * {@link String } > * > */ > public String getUseView() { > return useView; > } > > /** > * Sets the value of the useView property. > * > * @param value > * allowed object is > * {@link String } > * > */ > public void setUseView(String value) { > this.useView = value; > } > > } > > -----Original Message----- > From: Johan Edstrom [mailto:[email protected]] > Sent: Thursday, May 23, 2013 13:38 > To: [email protected] > Subject: Re: CXF client expects namespace, server doesn't send one. > > Are you doing Java first or WSDL first? > An error like this usually indicates that the server or the client is > generated against a faulty/changed interface. > > http://cxf.547215.n5.nabble.com/Unmarshalling-Error-td4927304.html > > On May 23, 2013, at 11:27 AM, David Nedrow <[email protected]> wrote: > >> javax.xml.ws.soap.SOAPFaultException: Unexpected wrapper element >
