### Question:
JaxWsServiceConfiguration extends AbstractServiceConfiguration { @Override public QName getOutPartName(OperationInfo op, Method method, int paramNumber) { method = getDeclaredMethod(method); if (paramNumber >= 0) { return getPartName(op, method, paramNumber, op.getOutput(), "return", false); } WebResult webResult = getWebResult(method); String tns = op.getOutput().getName().getNamespaceURI(); String local = null; if (webResult != null) { if (Boolean.TRUE.equals(isRPC(method)) || isDocumentBare(method)) { local = webResult.partName(); } if (local == null || local.length() == 0) { local = webResult.name(); } } if (local == null || local.length() == 0) { if (Boolean.TRUE.equals(isRPC(method)) || !Boolean.FALSE.equals(isWrapped(method))) { local = "return"; } else { local = getOperationName(op.getInterface(), method).getLocalPart() + "Response"; } } return new QName(tns, local); } JaxWsServiceConfiguration(); @Override void setServiceFactory(ReflectionServiceFactoryBean serviceFactory); @Override String getServiceName(); @Override String getServiceNamespace(); @Override QName getEndpointName(); @Override QName getInterfaceName(); @Override String getWsdlURL(); @Override QName getOperationName(InterfaceInfo intf, Method method); Boolean isWebMethod(final Method method); @Override Boolean isOperation(final Method method); @Override QName getInPartName(OperationInfo op, Method method, int paramNumber); @Override QName getInParameterName(OperationInfo op, Method method, int paramNumber); @Override String getRequestWrapperPartName(OperationInfo op, Method method); @Override String getResponseWrapperPartName(OperationInfo op, Method method); String getFaultMessageName(OperationInfo op, Class<?> exClass, Class<?> beanClass); @Override QName getOutParameterName(OperationInfo op, Method method, int paramNumber); @Override QName getOutPartName(OperationInfo op, Method method, int paramNumber); @Override Boolean isInParam(Method method, int j); @Override Boolean isOutParam(Method method, int j); @Override Boolean isInOutParam(Method method, int j); @Override QName getRequestWrapperName(OperationInfo op, Method method); @Override QName getResponseWrapperName(OperationInfo op, Method method); @Override Class<?> getResponseWrapper(Method selected); @Override String getResponseWrapperClassName(Method selected); String getRequestWrapperClassName(Method selected); @Override Class<?> getRequestWrapper(Method selected); @Override QName getFaultName(InterfaceInfo service, OperationInfo o, Class<?> exClass, Class<?> beanClass); @Override Boolean isWrapped(Method m); @Override Boolean isWrapped(); @Override Boolean isHeader(Method method, int j); @Override String getStyle(); @Override Boolean isRPC(Method method); @Override Boolean hasOutMessage(Method method); @Override String getAction(OperationInfo op, Method method); Boolean isHolder(Class<?> cls, Type type); Type getHolderType(Class<?> cls, Type type); Boolean isWrapperPartQualified(MessagePartInfo mpi); Long getWrapperPartMinOccurs(MessagePartInfo mpi);  }### Answer:
@Test public void testGetOutPartName() throws Exception { QName opName = new QName("http: Method sayHiMethod = Hello.class.getMethod("sayHi", new Class[]{}); ServiceInfo si = getMockedServiceModel("/wsdl/default_partname_test.wsdl"); JaxWsServiceConfiguration jwsc = new JaxWsServiceConfiguration(); JaxWsServiceFactoryBean bean = new JaxWsServiceFactoryBean(); bean.setServiceClass(Hello.class); jwsc.setServiceFactory(bean); OperationInfo op = si.getInterface().getOperation(opName); op.setOutput("output", new MessageInfo(op, MessageInfo.Type.OUTPUT, new QName("http: QName partName = jwsc.getOutPartName(op, sayHiMethod, -1); assertEquals("get wrong return partName", new QName("http: }