2

Soap エンドポイントに問題があります。公開されていないか、別の名前で公開されています。私が使用している他のエンドポイントが見つかりましたが、新しいエンドポイントでは次のようになります。

 org.springframework.ws.NoEndpointFoundException: No endpoint can be found for request [SaajSoapMessage mySoapEndpointRequest]

Spring 統合テストから公開されたエンドポイントを取得するにはどうすればよいですか? -エンドポイントが公開されているかどうか、または別の名前で公開されているかどうかを確認します-おそらくタイプミスか何か。

他のエンドポイントではサービスが機能し、違いは見られません。

これが私の統合テストです:

 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = {WebServiceConfigTest.class}, properties = {"application.address=http://hostname:port/context"})
 public class MySoapEndpointWebServiceTest {

  @Autowired
  private ApplicationContext applicationContext;

  private MockWebServiceClient mockClient;



@Before
@Autowired
public void init() {
    mockClient = MockWebServiceClient.createClient(applicationContext);
    MockitoAnnotations.initMocks(this);
}

@Test
public void shouldSearch() throws JAXBException {
    //given
    String givenSearchStr = "cfhfghfg";
    Source requestPayload = buildRequestPayload(buildMockRequest(givenSearchStr)); // here the MySoapEndpointRequest object is serialized
    Source expectedResponsePayload = buildTestResponsePayload(buildMockSearchResponse(givenSearchStr ));
    //when
    mockClient.sendRequest(withPayload(requestPayload))
            //then
            .andExpect(noFault())
            .andExpect(payload(expectedResponsePayload));
}

Webservice エンドポイントは次のようになります。

@Endpoint
public class MySoapEndpointWebService {

 public MySoapEndpointWebService (){}

 @PayloadRoot(namespace = SoapConstants.MY_SOAP_NAMESPACE_URI, localPart = "mySoapEndpointRequest")
 @ResponsePayload
 public MySoapEndpointResponse search(@RequestPayload MySoapEndpointRequest request) {
    throw new SoapFaultException("Service not implemented yet!");
 }

}

何か案は?

4

0 に答える 0